Updating NPM dependencies
This commit is contained in:
31
node_modules/expect/build/jasmineUtils.js
generated
vendored
31
node_modules/expect/build/jasmineUtils.js
generated
vendored
@@ -101,33 +101,32 @@ function eq(a, b, aStack, bStack, customTesters, hasKey) {
|
||||
}
|
||||
|
||||
switch (className) {
|
||||
// Strings, numbers, dates, and booleans are compared by value.
|
||||
case '[object Boolean]':
|
||||
case '[object String]':
|
||||
// Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is
|
||||
// equivalent to `new String("5")`.
|
||||
return a == String(b);
|
||||
|
||||
case '[object Number]':
|
||||
return Object.is(Number(a), Number(b));
|
||||
if (typeof a !== typeof b) {
|
||||
// One is a primitive, one a `new Primitive()`
|
||||
return false;
|
||||
} else if (typeof a !== 'object' && typeof b !== 'object') {
|
||||
// both are proper primitives
|
||||
return Object.is(a, b);
|
||||
} else {
|
||||
// both are `new Primitive()`s
|
||||
return Object.is(a.valueOf(), b.valueOf());
|
||||
}
|
||||
|
||||
case '[object Date]':
|
||||
case '[object Boolean]':
|
||||
// Coerce dates and booleans to numeric primitive values. Dates are compared by their
|
||||
// Coerce dates to numeric primitive values. Dates are compared by their
|
||||
// millisecond representations. Note that invalid dates with millisecond representations
|
||||
// of `NaN` are not equivalent.
|
||||
return +a == +b;
|
||||
// RegExps are compared by their source patterns and flags.
|
||||
|
||||
case '[object RegExp]':
|
||||
return (
|
||||
a.source == b.source &&
|
||||
a.global == b.global &&
|
||||
a.multiline == b.multiline &&
|
||||
a.ignoreCase == b.ignoreCase
|
||||
);
|
||||
return a.source === b.source && a.flags === b.flags;
|
||||
}
|
||||
|
||||
if (typeof a != 'object' || typeof b != 'object') {
|
||||
if (typeof a !== 'object' || typeof b !== 'object') {
|
||||
return false;
|
||||
} // Use DOM3 method isEqualNode (IE>=9)
|
||||
|
||||
@@ -196,7 +195,7 @@ function eq(a, b, aStack, bStack, customTesters, hasKey) {
|
||||
}
|
||||
|
||||
function keys(obj, isArray, hasKey) {
|
||||
var allKeys = (function(o) {
|
||||
var allKeys = (function (o) {
|
||||
var keys = [];
|
||||
|
||||
for (var key in o) {
|
||||
|
||||
Reference in New Issue
Block a user