mirror of
https://github.com/S2-/minifyfromhtml.git
synced 2025-08-03 12:20:04 +02:00
update node modules
This commit is contained in:
50
node_modules/fast-deep-equal/index.js
generated
vendored
50
node_modules/fast-deep-equal/index.js
generated
vendored
@@ -7,43 +7,43 @@ var hasProp = Object.prototype.hasOwnProperty;
|
||||
module.exports = function equal(a, b) {
|
||||
if (a === b) return true;
|
||||
|
||||
var arrA = isArray(a)
|
||||
, arrB = isArray(b)
|
||||
, i
|
||||
, length
|
||||
, key;
|
||||
if (a && b && typeof a == 'object' && typeof b == 'object') {
|
||||
var arrA = isArray(a)
|
||||
, arrB = isArray(b)
|
||||
, i
|
||||
, length
|
||||
, key;
|
||||
|
||||
if (arrA && arrB) {
|
||||
length = a.length;
|
||||
if (length != b.length) return false;
|
||||
for (i = 0; i < length; i++)
|
||||
if (!equal(a[i], b[i])) return false;
|
||||
return true;
|
||||
}
|
||||
if (arrA && arrB) {
|
||||
length = a.length;
|
||||
if (length != b.length) return false;
|
||||
for (i = length; i-- !== 0;)
|
||||
if (!equal(a[i], b[i])) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (arrA != arrB) return false;
|
||||
if (arrA != arrB) return false;
|
||||
|
||||
var dateA = a instanceof Date
|
||||
, dateB = b instanceof Date;
|
||||
if (dateA != dateB) return false;
|
||||
if (dateA && dateB) return a.getTime() == b.getTime();
|
||||
var dateA = a instanceof Date
|
||||
, dateB = b instanceof Date;
|
||||
if (dateA != dateB) return false;
|
||||
if (dateA && dateB) return a.getTime() == b.getTime();
|
||||
|
||||
var regexpA = a instanceof RegExp
|
||||
, regexpB = b instanceof RegExp;
|
||||
if (regexpA != regexpB) return false;
|
||||
if (regexpA && regexpB) return a.toString() == b.toString();
|
||||
var regexpA = a instanceof RegExp
|
||||
, regexpB = b instanceof RegExp;
|
||||
if (regexpA != regexpB) return false;
|
||||
if (regexpA && regexpB) return a.toString() == b.toString();
|
||||
|
||||
if (a instanceof Object && b instanceof Object) {
|
||||
var keys = keyList(a);
|
||||
length = keys.length;
|
||||
|
||||
if (length !== keyList(b).length)
|
||||
return false;
|
||||
|
||||
for (i = 0; i < length; i++)
|
||||
for (i = length; i-- !== 0;)
|
||||
if (!hasProp.call(b, keys[i])) return false;
|
||||
|
||||
for (i = 0; i < length; i++) {
|
||||
for (i = length; i-- !== 0;) {
|
||||
key = keys[i];
|
||||
if (!equal(a[key], b[key])) return false;
|
||||
}
|
||||
@@ -51,5 +51,5 @@ module.exports = function equal(a, b) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
return a!==a && b!==b;
|
||||
};
|
||||
|
Reference in New Issue
Block a user