<commit_before>'use strict';

var ObjectPrototype = Object.prototype;
var toStr = ObjectPrototype.toString;
var fnToStr = Function.prototype.toString;
var has = ObjectPrototype.hasOwnProperty;
var isArrowFunction = require('is-arrow-function');
var isDate = require('is-date-object');
var isGenerator = require('is-generator-function');
var isNumber = require('is-number-object');
var isRegex = require('is-regex');

var getPrototypeOf = Object.getPrototypeOf;
if (!getPrototypeOf) {
	if (typeof 'test'['__proto__'] === 'object') {
		getPrototypeOf = function (obj) {
			return obj['__proto__'];
		};
	} else {
		getPrototypeOf = function (obj) {
			var constructor = obj.constructor,
				oldConstructor;
			if (has.call(obj, 'constructor')) {
				oldConstructor = constructor;
				if (!(delete obj.constructor)) { // reset constructor
					return null; // can't delete obj.constructor, return null
				}
				constructor = obj.constructor; // get real constructor
				obj.constructor = oldConstructor; // restore constructor
			}
			return constructor ? constructor.prototype : ObjectPrototype; // needed for IE
		};
	}
}

var booleanValue = Boolean.prototype.valueOf;
var isBoolean = function isBoolean(value) {
	try {
		booleanValue.call(value);
		return true;
	} catch (e) {
		return false;
	}
};

var strToStr = String.prototype.valueOf;
var isString = function isString(value) {
	try {
		strToStr.call(value);
		return true;
	} catch (e) {
		return false;
	}
};
var arrayType = '[object Array]';
var objType = '[object Object]';

var isFunction = function (value) {
	try {
		fnToStr.call(value);
		return true;
	} catch (e) {
		return false;
	}
};

module.exports = function isEqual(value, other) {
	if (value === other) { return true; }

	var type = toStr.call(value);
	if (type !== toStr.call(other)) { return false; }

	var valIsBool = isBoolean(value);
	var otherIsBool = isBoolean(other);
	if (valIsBool || otherIsBool) {
		return valIsBool && otherIsBool && booleanValue.call(value) === booleanValue.call(other);
	}

	var valIsNumber = isNumber(value);
	var otherIsNumber = isNumber(value);
	if (valIsNumber || otherIsNumber) {
		return valIsNumber && otherIsNumber && (Number(value) === Number(other) || (isNaN(value) && isNaN(other)));
	}

	var valIsString = isString(value);
	var otherIsString = isString(other);
	if (valIsString || otherIsString) {
		return valIsString && otherIsString && String(value) === String(other);
	}
<commit_msg>Add an early return for `null`/`undefined`<commit_after>'use strict';

var ObjectPrototype = Object.prototype;
var toStr = ObjectPrototype.toString;
var fnToStr = Function.prototype.toString;
var has = ObjectPrototype.hasOwnProperty;
var isArrowFunction = require('is-arrow-function');
var isDate = require('is-date-object');
var isGenerator = require('is-generator-function');
var isNumber = require('is-number-object');
var isRegex = require('is-regex');

var getPrototypeOf = Object.getPrototypeOf;
if (!getPrototypeOf) {
	if (typeof 'test'['__proto__'] === 'object') {
		getPrototypeOf = function (obj) {
			return obj['__proto__'];
		};
	} else {
		getPrototypeOf = function (obj) {
			var constructor = obj.constructor,
				oldConstructor;
			if (has.call(obj, 'constructor')) {
				oldConstructor = constructor;
				if (!(delete obj.constructor)) { // reset constructor
					return null; // can't delete obj.constructor, return null
				}
				constructor = obj.constructor; // get real constructor
				obj.constructor = oldConstructor; // restore constructor
			}
			return constructor ? constructor.prototype : ObjectPrototype; // needed for IE
		};
	}
}

var booleanValue = Boolean.prototype.valueOf;
var isBoolean = function isBoolean(value) {
	try {
		booleanValue.call(value);
		return true;
	} catch (e) {
		return false;
	}
};

var strToStr = String.prototype.valueOf;
var isString = function isString(value) {
	try {
		strToStr.call(value);
		return true;
	} catch (e) {
		return false;
	}
};
var arrayType = '[object Array]';
var objType = '[object Object]';

var isFunction = function (value) {
	try {
		fnToStr.call(value);
		return true;
	} catch (e) {
		return false;
	}
};

module.exports = function isEqual(value, other) {
	if (value === other) { return true; }
	if (value == null || other == null) { return value === other; }

	var type = toStr.call(value);
	if (type !== toStr.call(other)) { return false; }

	var valIsBool = isBoolean(value);
	var otherIsBool = isBoolean(other);
	if (valIsBool || otherIsBool) {
		return valIsBool && otherIsBool && booleanValue.call(value) === booleanValue.call(other);
	}

	var valIsNumber = isNumber(value);
	var otherIsNumber = isNumber(value);
	if (valIsNumber || otherIsNumber) {
		return valIsNumber && otherIsNumber && (Number(value) === Number(other) || (isNaN(value) && isNaN(other)));
	}

	var valIsString = isString(value);
	var otherIsString = isString(other);
	if (valIsString || otherIsString) {
		return valIsString && otherIsString && String(value) === String(other);
	}

{'fraction_non_alphanumeric': 0.1414, 'fraction_numerical': 0.0, 'mean_word_length': 4.42407809110629, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '840068', 'n_tokens_mistral': 1659, 'n_tokens_neox': 1574, 'n_words': 403}