Comparing version 6.4.4 to 6.4.5
@@ -85,27 +85,35 @@ "use strict"; | ||
? true | ||
: a === null || b === null | ||
? a == b | ||
: a !== a | ||
? b !== b | ||
: typeof a !== 'object' || typeof b !== 'object' | ||
? false | ||
: !this.isError() && b instanceof Error | ||
? false | ||
: this.isError() && | ||
((b.message && b.message !== a.message) || | ||
(b.name && b.name !== a.name)) | ||
? false | ||
: this.isSet() && !new format_js_1.Format(b).isSet() | ||
? false | ||
: this.isMap() && !new format_js_1.Format(b).isMap() | ||
: a instanceof Date && b instanceof Date | ||
? a.getTime() === b.getTime() | ||
: typeof a?.valueOf === 'function' && | ||
typeof b?.valueOf === 'function' && | ||
a.valueOf() === b.valueOf() | ||
? true | ||
: typeof a?.valueOf === 'function' && a.valueOf() === b | ||
? true | ||
: typeof b?.valueOf === 'function' && b.valueOf() === a | ||
? true | ||
: a === null || b === null | ||
? a == b | ||
: a !== a | ||
? b !== b | ||
: typeof a !== 'object' || typeof b !== 'object' | ||
? false | ||
: this.isArray() && !new format_js_1.Format(b).isArray() | ||
: !this.isError() && b instanceof Error | ||
? false | ||
: Buffer.isBuffer(a) && Buffer.isBuffer(b) | ||
? a.equals(b) | ||
: a instanceof Date && b instanceof Date | ||
? a.getTime() === b.getTime() | ||
: a instanceof RegExp && b instanceof RegExp | ||
? this.regexpSame(a, b) | ||
: 'COMPLEX'; // might still be a deeper mismatch, of course | ||
: this.isError() && | ||
((b.message && b.message !== a.message) || | ||
(b.name && b.name !== a.name)) | ||
? false | ||
: this.isSet() && !new format_js_1.Format(b).isSet() | ||
? false | ||
: this.isMap() && !new format_js_1.Format(b).isMap() | ||
? false | ||
: this.isArray() && !new format_js_1.Format(b).isArray() | ||
? false | ||
: Buffer.isBuffer(a) && Buffer.isBuffer(b) | ||
? a.equals(b) | ||
: a instanceof RegExp && b instanceof RegExp | ||
? this.regexpSame(a, b) | ||
: 'COMPLEX'; // might still be a deeper mismatch, of course | ||
} | ||
@@ -112,0 +120,0 @@ regexpSame(a, b) { |
@@ -82,27 +82,35 @@ import { createTwoFilesPatch } from 'diff'; | ||
? true | ||
: a === null || b === null | ||
? a == b | ||
: a !== a | ||
? b !== b | ||
: typeof a !== 'object' || typeof b !== 'object' | ||
? false | ||
: !this.isError() && b instanceof Error | ||
? false | ||
: this.isError() && | ||
((b.message && b.message !== a.message) || | ||
(b.name && b.name !== a.name)) | ||
? false | ||
: this.isSet() && !new Format(b).isSet() | ||
? false | ||
: this.isMap() && !new Format(b).isMap() | ||
: a instanceof Date && b instanceof Date | ||
? a.getTime() === b.getTime() | ||
: typeof a?.valueOf === 'function' && | ||
typeof b?.valueOf === 'function' && | ||
a.valueOf() === b.valueOf() | ||
? true | ||
: typeof a?.valueOf === 'function' && a.valueOf() === b | ||
? true | ||
: typeof b?.valueOf === 'function' && b.valueOf() === a | ||
? true | ||
: a === null || b === null | ||
? a == b | ||
: a !== a | ||
? b !== b | ||
: typeof a !== 'object' || typeof b !== 'object' | ||
? false | ||
: this.isArray() && !new Format(b).isArray() | ||
: !this.isError() && b instanceof Error | ||
? false | ||
: Buffer.isBuffer(a) && Buffer.isBuffer(b) | ||
? a.equals(b) | ||
: a instanceof Date && b instanceof Date | ||
? a.getTime() === b.getTime() | ||
: a instanceof RegExp && b instanceof RegExp | ||
? this.regexpSame(a, b) | ||
: 'COMPLEX'; // might still be a deeper mismatch, of course | ||
: this.isError() && | ||
((b.message && b.message !== a.message) || | ||
(b.name && b.name !== a.name)) | ||
? false | ||
: this.isSet() && !new Format(b).isSet() | ||
? false | ||
: this.isMap() && !new Format(b).isMap() | ||
? false | ||
: this.isArray() && !new Format(b).isArray() | ||
? false | ||
: Buffer.isBuffer(a) && Buffer.isBuffer(b) | ||
? a.equals(b) | ||
: a instanceof RegExp && b instanceof RegExp | ||
? this.regexpSame(a, b) | ||
: 'COMPLEX'; // might still be a deeper mismatch, of course | ||
} | ||
@@ -109,0 +117,0 @@ regexpSame(a, b) { |
{ | ||
"name": "tcompare", | ||
"version": "6.4.4", | ||
"version": "6.4.5", | ||
"description": "A comprehensive comparison library, for use in test frameworks", | ||
@@ -5,0 +5,0 @@ "tshy": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
486592
5082