fast-equals 5.0.0-beta.2 → 5.0.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/umd/index.js CHANGED
@@ -4,113 +4,11 @@
4
4
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["fast-equals"] = {}));
5
5
  })(this, (function (exports) { 'use strict';
6
6
 
7
- var ARGUMENTS_TAG = '[object Arguments]';
8
- var BOOLEAN_TAG = '[object Boolean]';
9
- var DATE_TAG = '[object Date]';
10
- var MAP_TAG = '[object Map]';
11
- var NUMBER_TAG = '[object Number]';
12
- var OBJECT_TAG = '[object Object]';
13
- var REG_EXP_TAG = '[object RegExp]';
14
- var SET_TAG = '[object Set]';
15
- var STRING_TAG = '[object String]';
16
- var isArray = Array.isArray;
17
- var getTag = Object.prototype.toString.call.bind(Object.prototype.toString);
18
- function createComparator(_a) {
19
- var areArraysEqual = _a.areArraysEqual, areDatesEqual = _a.areDatesEqual, areMapsEqual = _a.areMapsEqual, areObjectsEqual = _a.areObjectsEqual, arePrimitiveWrappersEqual = _a.arePrimitiveWrappersEqual, areRegExpsEqual = _a.areRegExpsEqual, areSetsEqual = _a.areSetsEqual;
20
- /**
21
- * compare the value of the two objects and return true if they are equivalent in values
22
- */
23
- return function comparator(a, b, state) {
24
- // If the items are strictly equal, no need to do a value comparison.
25
- if (a === b) {
26
- return true;
27
- }
28
- // If the items are not non-nullish objects, then the only possibility
29
- // of them being equal but not strictly is if they are both `NaN`. Since
30
- // `NaN` is uniquely not equal to itself, we can use self-comparison of
31
- // both objects, which is faster than `isNaN()`.
32
- if (!a || !b || typeof a !== 'object' || typeof b !== 'object') {
33
- return a !== a && b !== b;
34
- }
35
- // Checks are listed in order of commonality of use-case:
36
- // 1. Common complex object types (plain object, array)
37
- // 2. Common data values (date, regexp)
38
- // 3. Less-common complex object types (map, set)
39
- // 4. Less-common data values (promise, primitive wrappers)
40
- // Inherently this is both subjective and assumptive, however
41
- // when reviewing comparable libraries in the wild this order
42
- // appears to be generally consistent.
43
- // `isPlainObject` only checks against the object's own realm. Cross-realm
44
- // comparisons are rare, and will be handled in the ultimate fallback, so
45
- // we can avoid the `toString.call()` cost unless necessary.
46
- if (a.constructor === Object && b.constructor === Object) {
47
- return areObjectsEqual(a, b, state);
48
- }
49
- // `isArray()` works on subclasses and is cross-realm, so we can again avoid
50
- // the `toString.call()` cost unless necessary by just checking if either
51
- // and then both are arrays.
52
- var aArray = isArray(a);
53
- var bArray = isArray(b);
54
- if (aArray || bArray) {
55
- return aArray === bArray && areArraysEqual(a, b, state);
56
- }
57
- // Since this is a custom object, use the classic `toString.call()` to get its
58
- // type. This is reasonably performant in modern environments like v8 and
59
- // SpiderMonkey, and allows for cross-realm comparison when other checks like
60
- // `instanceof` do not.
61
- var tag = getTag(a);
62
- if (tag !== getTag(b)) {
63
- return false;
64
- }
65
- if (tag === DATE_TAG) {
66
- return areDatesEqual(a, b, state);
67
- }
68
- if (tag === REG_EXP_TAG) {
69
- return areRegExpsEqual(a, b, state);
70
- }
71
- if (tag === MAP_TAG) {
72
- return areMapsEqual(a, b, state);
73
- }
74
- if (tag === SET_TAG) {
75
- return areSetsEqual(a, b, state);
76
- }
77
- // If a simple object tag, then we can prioritize a simple object comparison because
78
- // it is likely a custom class.
79
- if (tag === OBJECT_TAG) {
80
- // The exception for value comparison is `Promise`-like contracts. These should be
81
- // treated the same as standard `Promise` objects, which means strict equality, and if
82
- // it reaches this point then that strict equality comparison has already failed.
83
- return (typeof a.then !== 'function' &&
84
- typeof b.then !== 'function' &&
85
- areObjectsEqual(a, b, state));
86
- }
87
- // If an arguments tag, it should be treated as a standard object.
88
- if (tag === ARGUMENTS_TAG) {
89
- return areObjectsEqual(a, b, state);
90
- }
91
- // As the penultimate fallback, check if the values passed are primitive wrappers. This
92
- // is very rare in modern JS, which is why it is deprioritized compared to all other object
93
- // types.
94
- if (tag === BOOLEAN_TAG || tag === NUMBER_TAG || tag === STRING_TAG) {
95
- return arePrimitiveWrappersEqual(a, b, state);
96
- }
97
- // If not matching any tags that require a specific type of comparison, then we hard-code false because
98
- // the only thing remaining is strict equality, which has already been compared. This is for a few reasons:
99
- // - Certain types that cannot be introspected (e.g., `WeakMap`). For these types, this is the only
100
- // comparison that can be made.
101
- // - For types that can be introspected, but rarely have requirements to be compared
102
- // (`ArrayBuffer`, `DataView`, etc.), the cost is avoided to prioritize the common
103
- // use-cases (may be included in a future release, if requested enough).
104
- // - For types that can be introspected but do not have an objective definition of what
105
- // equality is (`Error`, etc.), the subjective decision is to be conservative and strictly compare.
106
- // In all cases, these decisions should be reevaluated based on changes to the language and
107
- // common development practices.
108
- return false;
109
- };
110
- }
111
-
112
7
  var getOwnPropertyNames = Object.getOwnPropertyNames, getOwnPropertySymbols = Object.getOwnPropertySymbols;
113
8
  var hasOwnProperty = Object.prototype.hasOwnProperty;
9
+ /**
10
+ * Combine two comparators into a single comparators.
11
+ */
114
12
  function combineComparators(comparatorA, comparatorB) {
115
13
  return function isEqual(a, b, state) {
116
14
  return comparatorA(a, b, state) && comparatorB(a, b, state);
@@ -149,9 +47,16 @@
149
47
  return result;
150
48
  };
151
49
  }
50
+ /**
51
+ * Get the properties to strictly examine, which include both own properties that are
52
+ * not enumerable and symbol properties.
53
+ */
152
54
  function getStrictProperties(object) {
153
55
  return getOwnPropertyNames(object).concat(getOwnPropertySymbols(object));
154
56
  }
57
+ /**
58
+ * Whether the object contains the property passed as an own property.
59
+ */
155
60
  var hasOwn = Object.hasOwn ||
156
61
  (function (object, property) {
157
62
  return hasOwnProperty.call(object, property);
@@ -182,10 +87,6 @@
182
87
  }
183
88
  /**
184
89
  * Whether the dates passed are equal in value.
185
- *
186
- * @NOTE
187
- * This is a standalone function instead of done inline in the comparator
188
- * to allow for overrides.
189
90
  */
190
91
  function areDatesEqual(a, b) {
191
92
  return sameValueZeroEqual(a.getTime(), b.getTime());
@@ -297,21 +198,12 @@
297
198
  }
298
199
  /**
299
200
  * Whether the primitive wrappers passed are equal in value.
300
- *
301
- * @NOTE
302
- * This is a standalone function instead of done inline in the comparator
303
- * to allow for overrides.
304
201
  */
305
202
  function arePrimitiveWrappersEqual(a, b) {
306
203
  return sameValueZeroEqual(a.valueOf(), b.valueOf());
307
204
  }
308
205
  /**
309
206
  * Whether the regexps passed are equal in value.
310
- *
311
- * @NOTE
312
- * This is a standalone function instead of done inline in the comparator
313
- * to allow for overrides. An example of this would be supporting a
314
- * pre-ES2015 environment where the `flags` property is not available.
315
207
  */
316
208
  function areRegExpsEqual(a, b) {
317
209
  return a.source === b.source && a.flags === b.flags;
@@ -348,94 +240,191 @@
348
240
  return isValueEqual;
349
241
  }
350
242
 
243
+ var ARGUMENTS_TAG = '[object Arguments]';
244
+ var BOOLEAN_TAG = '[object Boolean]';
245
+ var DATE_TAG = '[object Date]';
246
+ var MAP_TAG = '[object Map]';
247
+ var NUMBER_TAG = '[object Number]';
248
+ var OBJECT_TAG = '[object Object]';
249
+ var REG_EXP_TAG = '[object RegExp]';
250
+ var SET_TAG = '[object Set]';
251
+ var STRING_TAG = '[object String]';
252
+ var isArray = Array.isArray;
253
+ var assign = Object.assign;
254
+ var getTag = Object.prototype.toString.call.bind(Object.prototype.toString);
255
+ /**
256
+ * Create a comparator method based on the type-specific equality comparators passed.
257
+ */
258
+ function createComparator(_a) {
259
+ var areArraysEqual = _a.areArraysEqual, areDatesEqual = _a.areDatesEqual, areMapsEqual = _a.areMapsEqual, areObjectsEqual = _a.areObjectsEqual, arePrimitiveWrappersEqual = _a.arePrimitiveWrappersEqual, areRegExpsEqual = _a.areRegExpsEqual, areSetsEqual = _a.areSetsEqual;
260
+ /**
261
+ * compare the value of the two objects and return true if they are equivalent in values
262
+ */
263
+ return function comparator(a, b, state) {
264
+ // If the items are strictly equal, no need to do a value comparison.
265
+ if (a === b) {
266
+ return true;
267
+ }
268
+ // If the items are not non-nullish objects, then the only possibility
269
+ // of them being equal but not strictly is if they are both `NaN`. Since
270
+ // `NaN` is uniquely not equal to itself, we can use self-comparison of
271
+ // both objects, which is faster than `isNaN()`.
272
+ if (!a || !b || typeof a !== 'object' || typeof b !== 'object') {
273
+ return a !== a && b !== b;
274
+ }
275
+ // Checks are listed in order of commonality of use-case:
276
+ // 1. Common complex object types (plain object, array)
277
+ // 2. Common data values (date, regexp)
278
+ // 3. Less-common complex object types (map, set)
279
+ // 4. Less-common data values (promise, primitive wrappers)
280
+ // Inherently this is both subjective and assumptive, however
281
+ // when reviewing comparable libraries in the wild this order
282
+ // appears to be generally consistent.
283
+ // `isPlainObject` only checks against the object's own realm. Cross-realm
284
+ // comparisons are rare, and will be handled in the ultimate fallback, so
285
+ // we can avoid the `toString.call()` cost unless necessary.
286
+ if (a.constructor === Object && b.constructor === Object) {
287
+ return areObjectsEqual(a, b, state);
288
+ }
289
+ // `isArray()` works on subclasses and is cross-realm, so we can again avoid
290
+ // the `toString.call()` cost unless necessary by just checking if either
291
+ // and then both are arrays.
292
+ var aArray = isArray(a);
293
+ var bArray = isArray(b);
294
+ if (aArray || bArray) {
295
+ return aArray === bArray && areArraysEqual(a, b, state);
296
+ }
297
+ // Since this is a custom object, use the classic `toString.call()` to get its
298
+ // type. This is reasonably performant in modern environments like v8 and
299
+ // SpiderMonkey, and allows for cross-realm comparison when other checks like
300
+ // `instanceof` do not.
301
+ var tag = getTag(a);
302
+ if (tag !== getTag(b)) {
303
+ return false;
304
+ }
305
+ if (tag === DATE_TAG) {
306
+ return areDatesEqual(a, b, state);
307
+ }
308
+ if (tag === REG_EXP_TAG) {
309
+ return areRegExpsEqual(a, b, state);
310
+ }
311
+ if (tag === MAP_TAG) {
312
+ return areMapsEqual(a, b, state);
313
+ }
314
+ if (tag === SET_TAG) {
315
+ return areSetsEqual(a, b, state);
316
+ }
317
+ // If a simple object tag, then we can prioritize a simple object comparison because
318
+ // it is likely a custom class.
319
+ if (tag === OBJECT_TAG) {
320
+ // The exception for value comparison is `Promise`-like contracts. These should be
321
+ // treated the same as standard `Promise` objects, which means strict equality, and if
322
+ // it reaches this point then that strict equality comparison has already failed.
323
+ return (typeof a.then !== 'function' &&
324
+ typeof b.then !== 'function' &&
325
+ areObjectsEqual(a, b, state));
326
+ }
327
+ // If an arguments tag, it should be treated as a standard object.
328
+ if (tag === ARGUMENTS_TAG) {
329
+ return areObjectsEqual(a, b, state);
330
+ }
331
+ // As the penultimate fallback, check if the values passed are primitive wrappers. This
332
+ // is very rare in modern JS, which is why it is deprioritized compared to all other object
333
+ // types.
334
+ if (tag === BOOLEAN_TAG || tag === NUMBER_TAG || tag === STRING_TAG) {
335
+ return arePrimitiveWrappersEqual(a, b, state);
336
+ }
337
+ // If not matching any tags that require a specific type of comparison, then we hard-code false because
338
+ // the only thing remaining is strict equality, which has already been compared. This is for a few reasons:
339
+ // - Certain types that cannot be introspected (e.g., `WeakMap`). For these types, this is the only
340
+ // comparison that can be made.
341
+ // - For types that can be introspected, but rarely have requirements to be compared
342
+ // (`ArrayBuffer`, `DataView`, etc.), the cost is avoided to prioritize the common
343
+ // use-cases (may be included in a future release, if requested enough).
344
+ // - For types that can be introspected but do not have an objective definition of what
345
+ // equality is (`Error`, etc.), the subjective decision is to be conservative and strictly compare.
346
+ // In all cases, these decisions should be reevaluated based on changes to the language and
347
+ // common development practices.
348
+ return false;
349
+ };
350
+ }
351
+ /**
352
+ * Create the configuration object used for building comparators.
353
+ */
351
354
  function createComparatorConfig(_a) {
352
- var circular = _a.circular, strict = _a.strict;
355
+ var circular = _a.circular, createCustomConfig = _a.createCustomConfig, strict = _a.strict;
353
356
  var config = {
354
- areArraysEqual: areArraysEqual,
357
+ areArraysEqual: strict
358
+ ? areObjectsEqualStrict
359
+ : areArraysEqual,
355
360
  areDatesEqual: areDatesEqual,
356
- areMapsEqual: areMapsEqual,
357
- areObjectsEqual: areObjectsEqual,
361
+ areMapsEqual: strict
362
+ ? combineComparators(areMapsEqual, areObjectsEqualStrict)
363
+ : areMapsEqual,
364
+ areObjectsEqual: strict
365
+ ? areObjectsEqualStrict
366
+ : areObjectsEqual,
358
367
  arePrimitiveWrappersEqual: arePrimitiveWrappersEqual,
359
368
  areRegExpsEqual: areRegExpsEqual,
360
- areSetsEqual: areSetsEqual,
369
+ areSetsEqual: strict
370
+ ? combineComparators(areSetsEqual, areObjectsEqualStrict)
371
+ : areSetsEqual,
361
372
  };
362
- if (strict) {
363
- config.areArraysEqual = areObjectsEqual;
364
- config.areMapsEqual = combineComparators(areMapsEqual, areObjectsEqual);
365
- config.areObjectsEqual = areObjectsEqualStrict;
366
- config.areSetsEqual = combineComparators(areSetsEqual, areObjectsEqual);
373
+ if (createCustomConfig) {
374
+ config = assign({}, config, createCustomConfig(config));
367
375
  }
368
376
  if (circular) {
369
- config.areArraysEqual = createIsCircular(config.areArraysEqual);
370
- config.areMapsEqual = createIsCircular(config.areMapsEqual);
371
- config.areObjectsEqual = createIsCircular(config.areObjectsEqual);
372
- config.areSetsEqual = createIsCircular(config.areSetsEqual);
377
+ var areArraysEqual$1 = createIsCircular(config.areArraysEqual);
378
+ var areMapsEqual$1 = createIsCircular(config.areMapsEqual);
379
+ var areObjectsEqual$1 = createIsCircular(config.areObjectsEqual);
380
+ var areSetsEqual$1 = createIsCircular(config.areSetsEqual);
381
+ config = assign({}, config, {
382
+ areArraysEqual: areArraysEqual$1,
383
+ areMapsEqual: areMapsEqual$1,
384
+ areObjectsEqual: areObjectsEqual$1,
385
+ areSetsEqual: areSetsEqual$1,
386
+ });
373
387
  }
374
388
  return config;
375
389
  }
376
- function createDefaultEqualCreator(options) {
377
- if (options === void 0) { options = {}; }
378
- var config = createComparatorConfig(options);
379
- var isEqual = createComparator(config);
380
- var isEqualComparator = options.comparator || createInternalComparator(isEqual);
381
- var strict = !!options.strict;
382
- if (options.circular) {
383
- return function equals(a, b) {
384
- return isEqual(a, b, {
385
- cache: new WeakMap(),
386
- equals: isEqualComparator,
387
- meta: undefined,
388
- strict: strict,
389
- });
390
- };
391
- }
392
- var state = Object.freeze({
393
- cache: undefined,
394
- equals: isEqualComparator,
395
- meta: undefined,
396
- strict: strict,
397
- });
398
- return function equals(a, b) {
399
- return isEqual(a, b, state);
400
- };
401
- }
390
+
402
391
  /**
403
392
  * Whether the items passed are deeply-equal in value.
404
393
  */
405
- var deepEqual = createDefaultEqualCreator();
394
+ var deepEqual = createCustomEqual();
406
395
  /**
407
396
  * Whether the items passed are deeply-equal in value based on strict comparison.
408
397
  */
409
- var strictDeepEqual = createDefaultEqualCreator({ strict: true });
398
+ var strictDeepEqual = createCustomEqual({ strict: true });
410
399
  /**
411
400
  * Whether the items passed are deeply-equal in value, including circular references.
412
401
  */
413
- var circularDeepEqual = createDefaultEqualCreator({ circular: true });
402
+ var circularDeepEqual = createCustomEqual({ circular: true });
414
403
  /**
415
404
  * Whether the items passed are deeply-equal in value, including circular references,
416
405
  * based on strict comparison.
417
406
  */
418
- var strictCircularDeepEqual = createDefaultEqualCreator({
407
+ var strictCircularDeepEqual = createCustomEqual({
419
408
  circular: true,
420
409
  strict: true,
421
410
  });
422
411
  /**
423
412
  * Whether the items passed are shallowly-equal in value.
424
413
  */
425
- var shallowEqual = createDefaultEqualCreator({
414
+ var shallowEqual = createCustomEqual({
426
415
  comparator: sameValueZeroEqual,
427
416
  });
428
417
  /**
429
418
  * Whether the items passed are shallowly-equal in value based on strict comparison
430
419
  */
431
- var strictShallowEqual = createDefaultEqualCreator({
420
+ var strictShallowEqual = createCustomEqual({
432
421
  comparator: sameValueZeroEqual,
433
422
  strict: true,
434
423
  });
435
424
  /**
436
425
  * Whether the items passed are shallowly-equal in value, including circular references.
437
426
  */
438
- var circularShallowEqual = createDefaultEqualCreator({
427
+ var circularShallowEqual = createCustomEqual({
439
428
  comparator: sameValueZeroEqual,
440
429
  circular: true,
441
430
  });
@@ -443,7 +432,7 @@
443
432
  * Whether the items passed are shallowly-equal in value, including circular references,
444
433
  * based on strict comparison.
445
434
  */
446
- var strictCircularShallowEqual = createDefaultEqualCreator({
435
+ var strictCircularShallowEqual = createCustomEqual({
447
436
  comparator: sameValueZeroEqual,
448
437
  circular: true,
449
438
  strict: true,
@@ -458,35 +447,31 @@
458
447
  */
459
448
  function createCustomEqual(options) {
460
449
  if (options === void 0) { options = {}; }
461
- var comparator = options.comparator, createCustomInternalComparator = options.createInternalComparator, createCustomConfig = options.createCustomConfig, createState = options.createState;
462
- var baseConfig = createComparatorConfig(options);
463
- var config = createCustomConfig
464
- ? Object.assign({}, baseConfig, createCustomConfig(baseConfig))
465
- : baseConfig;
466
- var isEqualCustom = comparator || createComparator(config);
467
- var isEqualCustomComparator = createCustomInternalComparator
468
- ? createCustomInternalComparator(isEqualCustom)
469
- : createInternalComparator(isEqualCustom);
470
- var strict = !!options.strict;
450
+ var circular = options.circular, comparator = options.comparator, createCustomInternalComparator = options.createInternalComparator, createState = options.createState, _a = options.strict, baseStrict = _a === void 0 ? false : _a;
451
+ var config = createComparatorConfig(options);
452
+ var isEqualCustom = createComparator(config);
453
+ var isEqualCustomComparator = comparator ||
454
+ (createCustomInternalComparator
455
+ ? createCustomInternalComparator(isEqualCustom)
456
+ : createInternalComparator(isEqualCustom));
471
457
  if (createState) {
472
458
  return function isEqual(a, b, metaOverride) {
473
- var customState = createState(isEqualCustom);
459
+ var _a = createState(isEqualCustom), _b = _a.cache, cache = _b === void 0 ? circular ? new WeakMap() : undefined : _b, _c = _a.equals, equals = _c === void 0 ? isEqualCustomComparator : _c, meta = _a.meta, _d = _a.strict, strict = _d === void 0 ? baseStrict : _d;
474
460
  return isEqualCustom(a, b, {
475
- cache: customState.cache || new WeakMap(),
476
- equals: customState.equals || isEqualCustomComparator,
477
- // @ts-expect-error - inferred `Meta` may be undefined, which is okay
478
- meta: metaOverride !== undefined ? metaOverride : customState.meta,
479
- strict: customState.strict !== undefined ? customState.strict : strict,
461
+ cache: cache,
462
+ equals: equals,
463
+ meta: metaOverride !== undefined ? metaOverride : meta,
464
+ strict: strict,
480
465
  });
481
466
  };
482
467
  }
483
- if (options.circular) {
468
+ if (circular) {
484
469
  return function equals(a, b) {
485
470
  return isEqualCustom(a, b, {
486
471
  cache: new WeakMap(),
487
472
  equals: isEqualCustomComparator,
488
473
  meta: undefined,
489
- strict: strict,
474
+ strict: baseStrict,
490
475
  });
491
476
  };
492
477
  }
@@ -494,7 +479,7 @@
494
479
  cache: undefined,
495
480
  equals: isEqualCustomComparator,
496
481
  meta: undefined,
497
- strict: strict,
482
+ strict: baseStrict,
498
483
  });
499
484
  return function equals(a, b) {
500
485
  return isEqualCustom(a, b, state);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../src/comparator.ts","../../src/utils.ts","../../src/equals.ts","../../src/index.ts"],"sourcesContent":["import type {\n ComparatorConfig,\n EqualityComparator,\n State,\n} from './internalTypes';\n\nconst ARGUMENTS_TAG = '[object Arguments]';\nconst BOOLEAN_TAG = '[object Boolean]';\nconst DATE_TAG = '[object Date]';\nconst MAP_TAG = '[object Map]';\nconst NUMBER_TAG = '[object Number]';\nconst OBJECT_TAG = '[object Object]';\nconst REG_EXP_TAG = '[object RegExp]';\nconst SET_TAG = '[object Set]';\nconst STRING_TAG = '[object String]';\n\nconst { isArray } = Array;\nconst getTag = Object.prototype.toString.call.bind(\n Object.prototype.toString,\n) as (a: object) => string;\n\nexport function createComparator<Meta>({\n areArraysEqual,\n areDatesEqual,\n areMapsEqual,\n areObjectsEqual,\n arePrimitiveWrappersEqual,\n areRegExpsEqual,\n areSetsEqual,\n}: ComparatorConfig<Meta>): EqualityComparator<Meta> {\n /**\n * compare the value of the two objects and return true if they are equivalent in values\n */\n return function comparator(a: any, b: any, state: State<Meta>): boolean {\n // If the items are strictly equal, no need to do a value comparison.\n if (a === b) {\n return true;\n }\n\n // If the items are not non-nullish objects, then the only possibility\n // of them being equal but not strictly is if they are both `NaN`. Since\n // `NaN` is uniquely not equal to itself, we can use self-comparison of\n // both objects, which is faster than `isNaN()`.\n if (!a || !b || typeof a !== 'object' || typeof b !== 'object') {\n return a !== a && b !== b;\n }\n\n // Checks are listed in order of commonality of use-case:\n // 1. Common complex object types (plain object, array)\n // 2. Common data values (date, regexp)\n // 3. Less-common complex object types (map, set)\n // 4. Less-common data values (promise, primitive wrappers)\n // Inherently this is both subjective and assumptive, however\n // when reviewing comparable libraries in the wild this order\n // appears to be generally consistent.\n\n // `isPlainObject` only checks against the object's own realm. Cross-realm\n // comparisons are rare, and will be handled in the ultimate fallback, so\n // we can avoid the `toString.call()` cost unless necessary.\n if (a.constructor === Object && b.constructor === Object) {\n return areObjectsEqual(a, b, state);\n }\n\n // `isArray()` works on subclasses and is cross-realm, so we can again avoid\n // the `toString.call()` cost unless necessary by just checking if either\n // and then both are arrays.\n const aArray = isArray(a);\n const bArray = isArray(b);\n\n if (aArray || bArray) {\n return aArray === bArray && areArraysEqual(a, b, state);\n }\n\n // Since this is a custom object, use the classic `toString.call()` to get its\n // type. This is reasonably performant in modern environments like v8 and\n // SpiderMonkey, and allows for cross-realm comparison when other checks like\n // `instanceof` do not.\n const tag = getTag(a);\n\n if (tag !== getTag(b)) {\n return false;\n }\n\n if (tag === DATE_TAG) {\n return areDatesEqual(a, b, state);\n }\n\n if (tag === REG_EXP_TAG) {\n return areRegExpsEqual(a, b, state);\n }\n\n if (tag === MAP_TAG) {\n return areMapsEqual(a, b, state);\n }\n\n if (tag === SET_TAG) {\n return areSetsEqual(a, b, state);\n }\n\n // If a simple object tag, then we can prioritize a simple object comparison because\n // it is likely a custom class.\n if (tag === OBJECT_TAG) {\n // The exception for value comparison is `Promise`-like contracts. These should be\n // treated the same as standard `Promise` objects, which means strict equality, and if\n // it reaches this point then that strict equality comparison has already failed.\n return (\n typeof a.then !== 'function' &&\n typeof b.then !== 'function' &&\n areObjectsEqual(a, b, state)\n );\n }\n\n // If an arguments tag, it should be treated as a standard object.\n if (tag === ARGUMENTS_TAG) {\n return areObjectsEqual(a, b, state);\n }\n\n // As the penultimate fallback, check if the values passed are primitive wrappers. This\n // is very rare in modern JS, which is why it is deprioritized compared to all other object\n // types.\n if (tag === BOOLEAN_TAG || tag === NUMBER_TAG || tag === STRING_TAG) {\n return arePrimitiveWrappersEqual(a, b, state);\n }\n\n // If not matching any tags that require a specific type of comparison, then we hard-code false because\n // the only thing remaining is strict equality, which has already been compared. This is for a few reasons:\n // - Certain types that cannot be introspected (e.g., `WeakMap`). For these types, this is the only\n // comparison that can be made.\n // - For types that can be introspected, but rarely have requirements to be compared\n // (`ArrayBuffer`, `DataView`, etc.), the cost is avoided to prioritize the common\n // use-cases (may be included in a future release, if requested enough).\n // - For types that can be introspected but do not have an objective definition of what\n // equality is (`Error`, etc.), the subjective decision is to be conservative and strictly compare.\n // In all cases, these decisions should be reevaluated based on changes to the language and\n // common development practices.\n return false;\n };\n}\n","import {\n AnyEqualityComparator,\n BaseCircular,\n CircularState,\n Dictionary,\n EqualityComparator,\n InternalEqualityComparator,\n State,\n TypeEqualityComparator,\n} from './internalTypes';\n\nconst { getOwnPropertyNames, getOwnPropertySymbols } = Object;\nconst { hasOwnProperty } = Object.prototype;\n\nexport function combineComparators<Meta>(\n comparatorA: AnyEqualityComparator<Meta>,\n comparatorB: AnyEqualityComparator<Meta>,\n) {\n return function isEqual<A, B>(a: A, b: B, state: State<Meta>) {\n return comparatorA(a, b, state) && comparatorB(a, b, state);\n };\n}\n\n/**\n * Default equality comparator pass-through, used as the standard `isEqual` creator for\n * use inside the built comparator.\n */\nexport function createInternalComparator<Meta>(\n compare: EqualityComparator<Meta>,\n): InternalEqualityComparator<Meta> {\n return function (\n a: any,\n b: any,\n _indexOrKeyA: any,\n _indexOrKeyB: any,\n _parentA: any,\n _parentB: any,\n state: State<Meta>,\n ) {\n return compare(a, b, state);\n };\n}\n\n/**\n * Wrap the provided `areItemsEqual` method to manage the circular state, allowing\n * for circular references to be safely included in the comparison without creating\n * stack overflows.\n */\nexport function createIsCircular<\n AreItemsEqual extends TypeEqualityComparator<any, any>,\n>(areItemsEqual: AreItemsEqual): AreItemsEqual {\n return function isCircular(\n a: any,\n b: any,\n state: CircularState<BaseCircular>,\n ) {\n if (!a || !b || typeof a !== 'object' || typeof b !== 'object') {\n return areItemsEqual(a, b, state);\n }\n\n const { cache } = state;\n\n const cachedA = cache.get(a);\n const cachedB = cache.get(b);\n\n if (cachedA && cachedB) {\n return cachedA === b && cachedB === a;\n }\n\n cache.set(a, b);\n cache.set(b, a);\n\n const result = areItemsEqual(a, b, state);\n\n cache.delete(a);\n cache.delete(b);\n\n return result;\n } as AreItemsEqual;\n}\n\nexport function getStrictProperties(\n object: Dictionary,\n): Array<string | symbol> {\n return (getOwnPropertyNames(object) as Array<string | symbol>).concat(\n getOwnPropertySymbols(object),\n );\n}\n\nexport const hasOwn =\n Object.hasOwn ||\n ((object: Dictionary, property: number | string | symbol) =>\n hasOwnProperty.call(object, property));\n\n/**\n * Whether the values passed are strictly equal or both NaN.\n */\nexport function sameValueZeroEqual(a: any, b: any): boolean {\n return a || b ? a === b : a === b || (a !== a && b !== b);\n}\n","import { getStrictProperties, hasOwn, sameValueZeroEqual } from './utils';\nimport type { Dictionary, State } from './internalTypes';\n\nconst OWNER = '_owner';\n\nconst { getOwnPropertyDescriptor, keys } = Object;\n\n/**\n * Whether the arrays are equal in value.\n */\nexport function areArraysEqual(a: any[], b: any[], state: State<any>) {\n let index = a.length;\n\n if (b.length !== index) {\n return false;\n }\n\n while (index-- > 0) {\n if (!state.equals(a[index], b[index], index, index, a, b, state)) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * Whether the dates passed are equal in value.\n *\n * @NOTE\n * This is a standalone function instead of done inline in the comparator\n * to allow for overrides.\n */\nexport function areDatesEqual(a: Date, b: Date): boolean {\n return sameValueZeroEqual(a.getTime(), b.getTime());\n}\n\n/**\n * Whether the `Map`s are equal in value.\n */\nexport function areMapsEqual(\n a: Map<any, any>,\n b: Map<any, any>,\n state: State<any>,\n): boolean {\n let isValueEqual = a.size === b.size;\n\n if (isValueEqual && a.size) {\n // The use of `forEach()` is to avoid the transpilation cost of `for...of` comparisons, and\n // the inability to control the performance of the resulting code. It also avoids excessive\n // iteration compared to doing comparisons of `keys()` and `values()`. As a result, though,\n // we cannot short-circuit the iterations; bookkeeping must be done to short-circuit the\n // equality checks themselves.\n\n const matchedIndices: Record<number, true> = {};\n\n let indexA = 0;\n\n a.forEach((aValue, aKey) => {\n if (!isValueEqual) {\n return;\n }\n\n let hasMatch = false;\n let matchIndexB = 0;\n\n b.forEach((bValue, bKey) => {\n if (\n !hasMatch &&\n !matchedIndices[matchIndexB] &&\n (hasMatch =\n state.equals(aKey, bKey, indexA, matchIndexB, a, b, state) &&\n state.equals(aValue, bValue, aKey, bKey, a, b, state))\n ) {\n matchedIndices[matchIndexB] = true;\n }\n\n matchIndexB++;\n });\n\n indexA++;\n isValueEqual = hasMatch;\n });\n }\n\n return isValueEqual;\n}\n\n/**\n * Whether the objects are equal in value.\n */\nexport function areObjectsEqual(\n a: Dictionary,\n b: Dictionary,\n state: State<any>,\n): boolean {\n const properties = keys(a);\n\n let index = properties.length;\n\n if (keys(b).length !== index) {\n return false;\n }\n\n let property: string | symbol;\n\n // Decrementing `while` showed faster results than either incrementing or\n // decrementing `for` loop and than an incrementing `while` loop. Declarative\n // methods like `some` / `every` were not used to avoid incurring the garbage\n // cost of anonymous callbacks.\n while (index-- > 0) {\n property = properties[index]!;\n\n if (\n property === OWNER &&\n (a.$$typeof || b.$$typeof) &&\n a.$$typeof !== b.$$typeof\n ) {\n return false;\n }\n\n if (\n !hasOwn(b, property) ||\n !state.equals(a[property], b[property], property, property, a, b, state)\n ) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * Whether the objects are equal in value with strict property checking.\n */\nexport function areObjectsEqualStrict(\n a: Dictionary,\n b: Dictionary,\n state: State<any>,\n): boolean {\n const properties = getStrictProperties(a);\n\n let index = properties.length;\n\n if (getStrictProperties(b).length !== index) {\n return false;\n }\n\n let property: string | symbol;\n let descriptorA: ReturnType<typeof getOwnPropertyDescriptor>;\n let descriptorB: ReturnType<typeof getOwnPropertyDescriptor>;\n\n // Decrementing `while` showed faster results than either incrementing or\n // decrementing `for` loop and than an incrementing `while` loop. Declarative\n // methods like `some` / `every` were not used to avoid incurring the garbage\n // cost of anonymous callbacks.\n while (index-- > 0) {\n property = properties[index]!;\n\n if (\n property === OWNER &&\n (a.$$typeof || b.$$typeof) &&\n a.$$typeof !== b.$$typeof\n ) {\n return false;\n }\n\n if (!hasOwn(b, property)) {\n return false;\n }\n\n if (\n !state.equals(a[property], b[property], property, property, a, b, state)\n ) {\n return false;\n }\n\n descriptorA = getOwnPropertyDescriptor(a, property);\n descriptorB = getOwnPropertyDescriptor(b, property);\n\n if (\n (descriptorA || descriptorB) &&\n (!descriptorA ||\n !descriptorB ||\n descriptorA.configurable !== descriptorB.configurable ||\n descriptorA.enumerable !== descriptorB.enumerable ||\n descriptorA.writable !== descriptorB.writable)\n ) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * Whether the primitive wrappers passed are equal in value.\n *\n * @NOTE\n * This is a standalone function instead of done inline in the comparator\n * to allow for overrides.\n */\nexport function arePrimitiveWrappersEqual(a: Date, b: Date): boolean {\n return sameValueZeroEqual(a.valueOf(), b.valueOf());\n}\n\n/**\n * Whether the regexps passed are equal in value.\n *\n * @NOTE\n * This is a standalone function instead of done inline in the comparator\n * to allow for overrides. An example of this would be supporting a\n * pre-ES2015 environment where the `flags` property is not available.\n */\nexport function areRegExpsEqual(a: RegExp, b: RegExp): boolean {\n return a.source === b.source && a.flags === b.flags;\n}\n\n/**\n * Whether the `Set`s are equal in value.\n */\nexport function areSetsEqual(\n a: Set<any>,\n b: Set<any>,\n state: State<any>,\n): boolean {\n let isValueEqual = a.size === b.size;\n\n if (isValueEqual && a.size) {\n // The use of `forEach()` is to avoid the transpilation cost of `for...of` comparisons, and\n // the inability to control the performance of the resulting code. It also avoids excessive\n // iteration compared to doing comparisons of `keys()` and `values()`. As a result, though,\n // we cannot short-circuit the iterations; bookkeeping must be done to short-circuit the\n // equality checks themselves.\n\n const matchedIndices: Record<number, true> = {};\n\n a.forEach((aValue, aKey) => {\n if (!isValueEqual) {\n return;\n }\n\n let hasMatch = false;\n let matchIndex = 0;\n\n b.forEach((bValue, bKey) => {\n if (\n !hasMatch &&\n !matchedIndices[matchIndex] &&\n (hasMatch = state.equals(aValue, bValue, aKey, bKey, a, b, state))\n ) {\n matchedIndices[matchIndex] = true;\n }\n\n matchIndex++;\n });\n\n isValueEqual = hasMatch;\n });\n }\n\n return isValueEqual;\n}\n","import { createComparator } from './comparator';\nimport {\n areArraysEqual,\n areDatesEqual,\n areMapsEqual,\n areObjectsEqual,\n areObjectsEqualStrict,\n arePrimitiveWrappersEqual,\n areRegExpsEqual,\n areSetsEqual,\n} from './equals';\nimport type {\n CircularState,\n ComparatorConfig,\n CreateCustomComparatorConfig,\n CreateState,\n DefaultState,\n EqualityComparator,\n} from './internalTypes';\nimport {\n combineComparators,\n createInternalComparator,\n createIsCircular,\n sameValueZeroEqual,\n} from './utils';\n\nexport { sameValueZeroEqual };\nexport * from './internalTypes';\n\ninterface DefaultEqualCreatorOptions<Meta> {\n comparator?: EqualityComparator<Meta>;\n circular?: boolean;\n strict?: boolean;\n}\n\ninterface CustomEqualCreatorOptions<Meta>\n extends DefaultEqualCreatorOptions<Meta> {\n createCustomConfig?: CreateCustomComparatorConfig<Meta>;\n createInternalComparator?: typeof createInternalComparator;\n createState?: CreateState<Meta>;\n}\n\nfunction createComparatorConfig<Meta>({\n circular,\n strict,\n}: DefaultEqualCreatorOptions<Meta>) {\n const config: ComparatorConfig<Meta> = {\n areArraysEqual,\n areDatesEqual,\n areMapsEqual,\n areObjectsEqual,\n arePrimitiveWrappersEqual,\n areRegExpsEqual,\n areSetsEqual,\n };\n\n if (strict) {\n config.areArraysEqual = areObjectsEqual;\n config.areMapsEqual = combineComparators(areMapsEqual, areObjectsEqual);\n config.areObjectsEqual = areObjectsEqualStrict;\n config.areSetsEqual = combineComparators(areSetsEqual, areObjectsEqual);\n }\n\n if (circular) {\n config.areArraysEqual = createIsCircular(config.areArraysEqual);\n config.areMapsEqual = createIsCircular(config.areMapsEqual);\n config.areObjectsEqual = createIsCircular(config.areObjectsEqual);\n config.areSetsEqual = createIsCircular(config.areSetsEqual);\n }\n\n return config;\n}\n\nfunction createDefaultEqualCreator(\n options: DefaultEqualCreatorOptions<undefined> = {},\n) {\n const config = createComparatorConfig(options);\n const isEqual = createComparator(config);\n const isEqualComparator =\n options.comparator || createInternalComparator(isEqual);\n const strict = !!options.strict;\n\n if (options.circular) {\n return function equals<A, B>(a: A, b: B): boolean {\n return isEqual(a, b, {\n cache: new WeakMap(),\n equals: isEqualComparator,\n meta: undefined,\n strict,\n });\n };\n }\n\n const state = Object.freeze({\n cache: undefined,\n equals: isEqualComparator,\n meta: undefined,\n strict,\n });\n\n return function equals<A, B>(a: A, b: B): boolean {\n return isEqual(a, b, state);\n };\n}\n\n/**\n * Whether the items passed are deeply-equal in value.\n */\nexport const deepEqual = createDefaultEqualCreator();\n\n/**\n * Whether the items passed are deeply-equal in value based on strict comparison.\n */\nexport const strictDeepEqual = createDefaultEqualCreator({ strict: true });\n\n/**\n * Whether the items passed are deeply-equal in value, including circular references.\n */\nexport const circularDeepEqual = createDefaultEqualCreator({ circular: true });\n\n/**\n * Whether the items passed are deeply-equal in value, including circular references,\n * based on strict comparison.\n */\nexport const strictCircularDeepEqual = createDefaultEqualCreator({\n circular: true,\n strict: true,\n});\n\n/**\n * Whether the items passed are shallowly-equal in value.\n */\nexport const shallowEqual = createDefaultEqualCreator({\n comparator: sameValueZeroEqual,\n});\n\n/**\n * Whether the items passed are shallowly-equal in value based on strict comparison\n */\nexport const strictShallowEqual = createDefaultEqualCreator({\n comparator: sameValueZeroEqual,\n strict: true,\n});\n\n/**\n * Whether the items passed are shallowly-equal in value, including circular references.\n */\nexport const circularShallowEqual = createDefaultEqualCreator({\n comparator: sameValueZeroEqual,\n circular: true,\n});\n\n/**\n * Whether the items passed are shallowly-equal in value, including circular references,\n * based on strict comparison.\n */\nexport const strictCircularShallowEqual = createDefaultEqualCreator({\n comparator: sameValueZeroEqual,\n circular: true,\n strict: true,\n});\n\n/**\n * Create a custom equality comparison method.\n *\n * This can be done to create very targeted comparisons in extreme hot-path scenarios\n * where the standard methods are not performant enough, but can also be used to provide\n * support for legacy environments that do not support expected features like\n * `RegExp.prototype.flags` out of the box.\n */\nexport function createCustomEqual<Meta>(\n options: CustomEqualCreatorOptions<Meta> = {},\n) {\n const {\n comparator,\n createInternalComparator: createCustomInternalComparator,\n createCustomConfig,\n createState,\n } = options;\n\n const baseConfig = createComparatorConfig(options);\n const config = createCustomConfig\n ? Object.assign({}, baseConfig, createCustomConfig(baseConfig))\n : baseConfig;\n const isEqualCustom = comparator || createComparator(config);\n const isEqualCustomComparator = createCustomInternalComparator\n ? createCustomInternalComparator(isEqualCustom)\n : createInternalComparator(isEqualCustom);\n const strict = !!options.strict;\n\n if (createState) {\n return function isEqual<A, B>(a: A, b: B, metaOverride?: Meta): boolean {\n const customState = createState(isEqualCustom);\n\n return isEqualCustom(a, b, {\n cache: customState.cache || new WeakMap(),\n equals: customState.equals || isEqualCustomComparator,\n // @ts-expect-error - inferred `Meta` may be undefined, which is okay\n meta: metaOverride !== undefined ? metaOverride : customState.meta,\n strict: customState.strict !== undefined ? customState.strict : strict,\n });\n };\n }\n\n if (options.circular) {\n return function equals<A, B>(a: A, b: B): boolean {\n return isEqualCustom(a, b, {\n cache: new WeakMap(),\n equals: isEqualCustomComparator,\n meta: undefined as Meta,\n strict,\n } as CircularState<Meta>);\n };\n }\n\n const state = Object.freeze({\n cache: undefined,\n equals: isEqualCustomComparator,\n meta: undefined,\n strict,\n });\n\n return function equals<A, B>(a: A, b: B): boolean {\n return isEqualCustom(a, b, state as DefaultState<Meta>);\n };\n}\n"],"names":[],"mappings":";;;;;;IAMA,IAAM,aAAa,GAAG,oBAAoB,CAAC;IAC3C,IAAM,WAAW,GAAG,kBAAkB,CAAC;IACvC,IAAM,QAAQ,GAAG,eAAe,CAAC;IACjC,IAAM,OAAO,GAAG,cAAc,CAAC;IAC/B,IAAM,UAA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AErD,gBAAA,IAAI,EAAE,YAAY,KAAK,SAAS,GAAG,YAAY,GAAG,WAAW,CAAC,IAAI;IAClE,gBAAA,MAAM,EAAE,WAAW,CAAC,MAAM,KAAK,SAAS,GAAG,WAAW,CAAC,MAAM,GAAG,MAAM;IACvE,aAAA,CAAC,CAAC;IACL,SAAC,CAAC;IACH,KAAA;QAED,IAAI,OAAO,CAAC,QAAQ,EAAE;IACpB,QAAA,OAAO,SAAS,MAAM,CAAO,CAAI,EAAE,CAAI,EAAA;IACrC,YAAA,OAAO,aAAa,CAAC,CAAC,EAAE,CAAC,EAAE;oBACzB,KAAK,EAAE,IAAI,OAAO,EAAE;IACpB,gBAAA,MAAM,EAAE,uBAAuB;IAC/B,gBAAA,IAAI,EAAE,SAAiB;IACvB,gBAAA,MAAM,EAAA,MAAA;IACgB,aAAA,CAAC,CAAC;IAC5B,SAAC,CAAC;IACH,KAAA;IAED,IAAA,IAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC;IAC1B,QAAA,KAAK,EAAE,SAAS;IAChB,QAAA,MAAM,EAAE,uBAAuB;IAC/B,QAAA,IAAI,EAAE,SAAS;IACf,QAAA,MAAM,EAAA,MAAA;IACP,KAAA,CAAC,CAAC;IAEH,IAAA,OAAO,SAAS,MAAM,CAAO,CAAI,EAAE,CAAI,EAAA;YACrC,OAAO,aAAa,CAAC,CAAC,EAAE,CAAC,EAAE,KAA2B,CAAC,CAAC;IAC1D,KAAC,CAAC;IACJ;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../src/utils.ts","../../src/equals.ts","../../src/comparator.ts","../../src/index.ts"],"sourcesContent":["import {\n AnyEqualityComparator,\n BaseCircular,\n CircularState,\n Dictionary,\n EqualityComparator,\n InternalEqualityComparator,\n State,\n TypeEqualityComparator,\n} from './internalTypes';\n\nconst { getOwnPropertyNames, getOwnPropertySymbols } = Object;\nconst { hasOwnProperty } = Object.prototype;\n\n/**\n * Combine two comparators into a single comparators.\n */\nexport function combineComparators<Meta>(\n comparatorA: AnyEqualityComparator<Meta>,\n comparatorB: AnyEqualityComparator<Meta>,\n) {\n return function isEqual<A, B>(a: A, b: B, state: State<Meta>) {\n return comparatorA(a, b, state) && comparatorB(a, b, state);\n };\n}\n\n/**\n * Default equality comparator pass-through, used as the standard `isEqual` creator for\n * use inside the built comparator.\n */\nexport function createInternalComparator<Meta>(\n compare: EqualityComparator<Meta>,\n): InternalEqualityComparator<Meta> {\n return function (\n a: any,\n b: any,\n _indexOrKeyA: any,\n _indexOrKeyB: any,\n _parentA: any,\n _parentB: any,\n state: State<Meta>,\n ) {\n return compare(a, b, state);\n };\n}\n\n/**\n * Wrap the provided `areItemsEqual` method to manage the circular state, allowing\n * for circular references to be safely included in the comparison without creating\n * stack overflows.\n */\nexport function createIsCircular<\n AreItemsEqual extends TypeEqualityComparator<any, any>,\n>(areItemsEqual: AreItemsEqual): AreItemsEqual {\n return function isCircular(\n a: any,\n b: any,\n state: CircularState<BaseCircular>,\n ) {\n if (!a || !b || typeof a !== 'object' || typeof b !== 'object') {\n return areItemsEqual(a, b, state);\n }\n\n const { cache } = state;\n\n const cachedA = cache.get(a);\n const cachedB = cache.get(b);\n\n if (cachedA && cachedB) {\n return cachedA === b && cachedB === a;\n }\n\n cache.set(a, b);\n cache.set(b, a);\n\n const result = areItemsEqual(a, b, state);\n\n cache.delete(a);\n cache.delete(b);\n\n return result;\n } as AreItemsEqual;\n}\n\n/**\n * Get the properties to strictly examine, which include both own properties that are\n * not enumerable and symbol properties.\n */\nexport function getStrictProperties(\n object: Dictionary,\n): Array<string | symbol> {\n return (getOwnPropertyNames(object) as Array<string | symbol>).concat(\n getOwnPropertySymbols(object),\n );\n}\n\n/**\n * Whether the object contains the property passed as an own property.\n */\nexport const hasOwn =\n Object.hasOwn ||\n ((object: Dictionary, property: number | string | symbol) =>\n hasOwnProperty.call(object, property));\n\n/**\n * Whether the values passed are strictly equal or both NaN.\n */\nexport function sameValueZeroEqual(a: any, b: any): boolean {\n return a || b ? a === b : a === b || (a !== a && b !== b);\n}\n","import { getStrictProperties, hasOwn, sameValueZeroEqual } from './utils';\nimport type { Dictionary, State } from './internalTypes';\n\nconst OWNER = '_owner';\n\nconst { getOwnPropertyDescriptor, keys } = Object;\n\n/**\n * Whether the arrays are equal in value.\n */\nexport function areArraysEqual(a: any[], b: any[], state: State<any>) {\n let index = a.length;\n\n if (b.length !== index) {\n return false;\n }\n\n while (index-- > 0) {\n if (!state.equals(a[index], b[index], index, index, a, b, state)) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * Whether the dates passed are equal in value.\n */\nexport function areDatesEqual(a: Date, b: Date): boolean {\n return sameValueZeroEqual(a.getTime(), b.getTime());\n}\n\n/**\n * Whether the `Map`s are equal in value.\n */\nexport function areMapsEqual(\n a: Map<any, any>,\n b: Map<any, any>,\n state: State<any>,\n): boolean {\n let isValueEqual = a.size === b.size;\n\n if (isValueEqual && a.size) {\n // The use of `forEach()` is to avoid the transpilation cost of `for...of` comparisons, and\n // the inability to control the performance of the resulting code. It also avoids excessive\n // iteration compared to doing comparisons of `keys()` and `values()`. As a result, though,\n // we cannot short-circuit the iterations; bookkeeping must be done to short-circuit the\n // equality checks themselves.\n\n const matchedIndices: Record<number, true> = {};\n\n let indexA = 0;\n\n a.forEach((aValue, aKey) => {\n if (!isValueEqual) {\n return;\n }\n\n let hasMatch = false;\n let matchIndexB = 0;\n\n b.forEach((bValue, bKey) => {\n if (\n !hasMatch &&\n !matchedIndices[matchIndexB] &&\n (hasMatch =\n state.equals(aKey, bKey, indexA, matchIndexB, a, b, state) &&\n state.equals(aValue, bValue, aKey, bKey, a, b, state))\n ) {\n matchedIndices[matchIndexB] = true;\n }\n\n matchIndexB++;\n });\n\n indexA++;\n isValueEqual = hasMatch;\n });\n }\n\n return isValueEqual;\n}\n\n/**\n * Whether the objects are equal in value.\n */\nexport function areObjectsEqual(\n a: Dictionary,\n b: Dictionary,\n state: State<any>,\n): boolean {\n const properties = keys(a);\n\n let index = properties.length;\n\n if (keys(b).length !== index) {\n return false;\n }\n\n let property: string | symbol;\n\n // Decrementing `while` showed faster results than either incrementing or\n // decrementing `for` loop and than an incrementing `while` loop. Declarative\n // methods like `some` / `every` were not used to avoid incurring the garbage\n // cost of anonymous callbacks.\n while (index-- > 0) {\n property = properties[index]!;\n\n if (\n property === OWNER &&\n (a.$$typeof || b.$$typeof) &&\n a.$$typeof !== b.$$typeof\n ) {\n return false;\n }\n\n if (\n !hasOwn(b, property) ||\n !state.equals(a[property], b[property], property, property, a, b, state)\n ) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * Whether the objects are equal in value with strict property checking.\n */\nexport function areObjectsEqualStrict(\n a: Dictionary,\n b: Dictionary,\n state: State<any>,\n): boolean {\n const properties = getStrictProperties(a);\n\n let index = properties.length;\n\n if (getStrictProperties(b).length !== index) {\n return false;\n }\n\n let property: string | symbol;\n let descriptorA: ReturnType<typeof getOwnPropertyDescriptor>;\n let descriptorB: ReturnType<typeof getOwnPropertyDescriptor>;\n\n // Decrementing `while` showed faster results than either incrementing or\n // decrementing `for` loop and than an incrementing `while` loop. Declarative\n // methods like `some` / `every` were not used to avoid incurring the garbage\n // cost of anonymous callbacks.\n while (index-- > 0) {\n property = properties[index]!;\n\n if (\n property === OWNER &&\n (a.$$typeof || b.$$typeof) &&\n a.$$typeof !== b.$$typeof\n ) {\n return false;\n }\n\n if (!hasOwn(b, property)) {\n return false;\n }\n\n if (\n !state.equals(a[property], b[property], property, property, a, b, state)\n ) {\n return false;\n }\n\n descriptorA = getOwnPropertyDescriptor(a, property);\n descriptorB = getOwnPropertyDescriptor(b, property);\n\n if (\n (descriptorA || descriptorB) &&\n (!descriptorA ||\n !descriptorB ||\n descriptorA.configurable !== descriptorB.configurable ||\n descriptorA.enumerable !== descriptorB.enumerable ||\n descriptorA.writable !== descriptorB.writable)\n ) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * Whether the primitive wrappers passed are equal in value.\n */\nexport function arePrimitiveWrappersEqual(a: Date, b: Date): boolean {\n return sameValueZeroEqual(a.valueOf(), b.valueOf());\n}\n\n/**\n * Whether the regexps passed are equal in value.\n */\nexport function areRegExpsEqual(a: RegExp, b: RegExp): boolean {\n return a.source === b.source && a.flags === b.flags;\n}\n\n/**\n * Whether the `Set`s are equal in value.\n */\nexport function areSetsEqual(\n a: Set<any>,\n b: Set<any>,\n state: State<any>,\n): boolean {\n let isValueEqual = a.size === b.size;\n\n if (isValueEqual && a.size) {\n // The use of `forEach()` is to avoid the transpilation cost of `for...of` comparisons, and\n // the inability to control the performance of the resulting code. It also avoids excessive\n // iteration compared to doing comparisons of `keys()` and `values()`. As a result, though,\n // we cannot short-circuit the iterations; bookkeeping must be done to short-circuit the\n // equality checks themselves.\n\n const matchedIndices: Record<number, true> = {};\n\n a.forEach((aValue, aKey) => {\n if (!isValueEqual) {\n return;\n }\n\n let hasMatch = false;\n let matchIndex = 0;\n\n b.forEach((bValue, bKey) => {\n if (\n !hasMatch &&\n !matchedIndices[matchIndex] &&\n (hasMatch = state.equals(aValue, bValue, aKey, bKey, a, b, state))\n ) {\n matchedIndices[matchIndex] = true;\n }\n\n matchIndex++;\n });\n\n isValueEqual = hasMatch;\n });\n }\n\n return isValueEqual;\n}\n","import {\n areArraysEqual as areArraysEqualDefault,\n areDatesEqual as areDatesEqualDefault,\n areMapsEqual as areMapsEqualDefault,\n areObjectsEqual as areObjectsEqualDefault,\n areObjectsEqualStrict as areObjectsEqualStrictDefault,\n arePrimitiveWrappersEqual as arePrimitiveWrappersEqualDefault,\n areRegExpsEqual as areRegExpsEqualDefault,\n areSetsEqual as areSetsEqualDefault,\n} from './equals';\nimport { combineComparators, createIsCircular } from './utils';\nimport type {\n ComparatorConfig,\n CustomEqualCreatorOptions,\n EqualityComparator,\n State,\n} from './internalTypes';\n\nconst ARGUMENTS_TAG = '[object Arguments]';\nconst BOOLEAN_TAG = '[object Boolean]';\nconst DATE_TAG = '[object Date]';\nconst MAP_TAG = '[object Map]';\nconst NUMBER_TAG = '[object Number]';\nconst OBJECT_TAG = '[object Object]';\nconst REG_EXP_TAG = '[object RegExp]';\nconst SET_TAG = '[object Set]';\nconst STRING_TAG = '[object String]';\n\nconst { isArray } = Array;\nconst { assign } = Object;\nconst getTag = Object.prototype.toString.call.bind(\n Object.prototype.toString,\n) as (a: object) => string;\n\n/**\n * Create a comparator method based on the type-specific equality comparators passed.\n */\nexport function createComparator<Meta>({\n areArraysEqual,\n areDatesEqual,\n areMapsEqual,\n areObjectsEqual,\n arePrimitiveWrappersEqual,\n areRegExpsEqual,\n areSetsEqual,\n}: ComparatorConfig<Meta>): EqualityComparator<Meta> {\n /**\n * compare the value of the two objects and return true if they are equivalent in values\n */\n return function comparator(a: any, b: any, state: State<Meta>): boolean {\n // If the items are strictly equal, no need to do a value comparison.\n if (a === b) {\n return true;\n }\n\n // If the items are not non-nullish objects, then the only possibility\n // of them being equal but not strictly is if they are both `NaN`. Since\n // `NaN` is uniquely not equal to itself, we can use self-comparison of\n // both objects, which is faster than `isNaN()`.\n if (!a || !b || typeof a !== 'object' || typeof b !== 'object') {\n return a !== a && b !== b;\n }\n\n // Checks are listed in order of commonality of use-case:\n // 1. Common complex object types (plain object, array)\n // 2. Common data values (date, regexp)\n // 3. Less-common complex object types (map, set)\n // 4. Less-common data values (promise, primitive wrappers)\n // Inherently this is both subjective and assumptive, however\n // when reviewing comparable libraries in the wild this order\n // appears to be generally consistent.\n\n // `isPlainObject` only checks against the object's own realm. Cross-realm\n // comparisons are rare, and will be handled in the ultimate fallback, so\n // we can avoid the `toString.call()` cost unless necessary.\n if (a.constructor === Object && b.constructor === Object) {\n return areObjectsEqual(a, b, state);\n }\n\n // `isArray()` works on subclasses and is cross-realm, so we can again avoid\n // the `toString.call()` cost unless necessary by just checking if either\n // and then both are arrays.\n const aArray = isArray(a);\n const bArray = isArray(b);\n\n if (aArray || bArray) {\n return aArray === bArray && areArraysEqual(a, b, state);\n }\n\n // Since this is a custom object, use the classic `toString.call()` to get its\n // type. This is reasonably performant in modern environments like v8 and\n // SpiderMonkey, and allows for cross-realm comparison when other checks like\n // `instanceof` do not.\n const tag = getTag(a);\n\n if (tag !== getTag(b)) {\n return false;\n }\n\n if (tag === DATE_TAG) {\n return areDatesEqual(a, b, state);\n }\n\n if (tag === REG_EXP_TAG) {\n return areRegExpsEqual(a, b, state);\n }\n\n if (tag === MAP_TAG) {\n return areMapsEqual(a, b, state);\n }\n\n if (tag === SET_TAG) {\n return areSetsEqual(a, b, state);\n }\n\n // If a simple object tag, then we can prioritize a simple object comparison because\n // it is likely a custom class.\n if (tag === OBJECT_TAG) {\n // The exception for value comparison is `Promise`-like contracts. These should be\n // treated the same as standard `Promise` objects, which means strict equality, and if\n // it reaches this point then that strict equality comparison has already failed.\n return (\n typeof a.then !== 'function' &&\n typeof b.then !== 'function' &&\n areObjectsEqual(a, b, state)\n );\n }\n\n // If an arguments tag, it should be treated as a standard object.\n if (tag === ARGUMENTS_TAG) {\n return areObjectsEqual(a, b, state);\n }\n\n // As the penultimate fallback, check if the values passed are primitive wrappers. This\n // is very rare in modern JS, which is why it is deprioritized compared to all other object\n // types.\n if (tag === BOOLEAN_TAG || tag === NUMBER_TAG || tag === STRING_TAG) {\n return arePrimitiveWrappersEqual(a, b, state);\n }\n\n // If not matching any tags that require a specific type of comparison, then we hard-code false because\n // the only thing remaining is strict equality, which has already been compared. This is for a few reasons:\n // - Certain types that cannot be introspected (e.g., `WeakMap`). For these types, this is the only\n // comparison that can be made.\n // - For types that can be introspected, but rarely have requirements to be compared\n // (`ArrayBuffer`, `DataView`, etc.), the cost is avoided to prioritize the common\n // use-cases (may be included in a future release, if requested enough).\n // - For types that can be introspected but do not have an objective definition of what\n // equality is (`Error`, etc.), the subjective decision is to be conservative and strictly compare.\n // In all cases, these decisions should be reevaluated based on changes to the language and\n // common development practices.\n return false;\n };\n}\n\n/**\n * Create the configuration object used for building comparators.\n */\nexport function createComparatorConfig<Meta>({\n circular,\n createCustomConfig,\n strict,\n}: CustomEqualCreatorOptions<Meta>): ComparatorConfig<Meta> {\n let config = {\n areArraysEqual: strict\n ? areObjectsEqualStrictDefault\n : areArraysEqualDefault,\n areDatesEqual: areDatesEqualDefault,\n areMapsEqual: strict\n ? combineComparators(areMapsEqualDefault, areObjectsEqualStrictDefault)\n : areMapsEqualDefault,\n areObjectsEqual: strict\n ? areObjectsEqualStrictDefault\n : areObjectsEqualDefault,\n arePrimitiveWrappersEqual: arePrimitiveWrappersEqualDefault,\n areRegExpsEqual: areRegExpsEqualDefault,\n areSetsEqual: strict\n ? combineComparators(areSetsEqualDefault, areObjectsEqualStrictDefault)\n : areSetsEqualDefault,\n };\n\n if (createCustomConfig) {\n config = assign({}, config, createCustomConfig(config));\n }\n\n if (circular) {\n const areArraysEqual = createIsCircular(config.areArraysEqual);\n const areMapsEqual = createIsCircular(config.areMapsEqual);\n const areObjectsEqual = createIsCircular(config.areObjectsEqual);\n const areSetsEqual = createIsCircular(config.areSetsEqual);\n\n config = assign({}, config, {\n areArraysEqual,\n areMapsEqual,\n areObjectsEqual,\n areSetsEqual,\n });\n }\n\n return config;\n}\n","import { createComparator, createComparatorConfig } from './comparator';\nimport type {\n CircularState,\n CustomEqualCreatorOptions,\n DefaultState,\n} from './internalTypes';\nimport { createInternalComparator, sameValueZeroEqual } from './utils';\n\nexport { sameValueZeroEqual };\nexport * from './internalTypes';\n\n/**\n * Whether the items passed are deeply-equal in value.\n */\nexport const deepEqual = createCustomEqual();\n\n/**\n * Whether the items passed are deeply-equal in value based on strict comparison.\n */\nexport const strictDeepEqual = createCustomEqual({ strict: true });\n\n/**\n * Whether the items passed are deeply-equal in value, including circular references.\n */\nexport const circularDeepEqual = createCustomEqual({ circular: true });\n\n/**\n * Whether the items passed are deeply-equal in value, including circular references,\n * based on strict comparison.\n */\nexport const strictCircularDeepEqual = createCustomEqual({\n circular: true,\n strict: true,\n});\n\n/**\n * Whether the items passed are shallowly-equal in value.\n */\nexport const shallowEqual = createCustomEqual({\n comparator: sameValueZeroEqual,\n});\n\n/**\n * Whether the items passed are shallowly-equal in value based on strict comparison\n */\nexport const strictShallowEqual = createCustomEqual({\n comparator: sameValueZeroEqual,\n strict: true,\n});\n\n/**\n * Whether the items passed are shallowly-equal in value, including circular references.\n */\nexport const circularShallowEqual = createCustomEqual({\n comparator: sameValueZeroEqual,\n circular: true,\n});\n\n/**\n * Whether the items passed are shallowly-equal in value, including circular references,\n * based on strict comparison.\n */\nexport const strictCircularShallowEqual = createCustomEqual({\n comparator: sameValueZeroEqual,\n circular: true,\n strict: true,\n});\n\n/**\n * Create a custom equality comparison method.\n *\n * This can be done to create very targeted comparisons in extreme hot-path scenarios\n * where the standard methods are not performant enough, but can also be used to provide\n * support for legacy environments that do not support expected features like\n * `RegExp.prototype.flags` out of the box.\n */\nexport function createCustomEqual<Meta>(\n options: CustomEqualCreatorOptions<Meta> = {},\n) {\n const {\n circular,\n comparator,\n createInternalComparator: createCustomInternalComparator,\n createState,\n strict: baseStrict = false,\n } = options;\n\n const config = createComparatorConfig<Meta>(options);\n const isEqualCustom = createComparator(config);\n const isEqualCustomComparator =\n comparator ||\n (createCustomInternalComparator\n ? createCustomInternalComparator(isEqualCustom)\n : createInternalComparator(isEqualCustom));\n\n if (createState) {\n return function isEqual<A, B>(\n a: A,\n b: B,\n metaOverride?: Meta | undefined,\n ): boolean {\n const {\n cache = circular ? new WeakMap() : undefined,\n equals = isEqualCustomComparator,\n meta,\n strict = baseStrict,\n } = createState!(isEqualCustom);\n\n return isEqualCustom(a, b, {\n cache,\n equals,\n meta: metaOverride !== undefined ? metaOverride : meta,\n strict,\n } as CircularState<Meta>);\n };\n }\n\n if (circular) {\n return function equals<A, B>(a: A, b: B): boolean {\n return isEqualCustom(a, b, {\n cache: new WeakMap(),\n equals: isEqualCustomComparator,\n meta: undefined as Meta,\n strict: baseStrict,\n } as CircularState<Meta>);\n };\n }\n\n const state = Object.freeze({\n cache: undefined,\n equals: isEqualCustomComparator,\n meta: undefined,\n strict: baseStrict,\n });\n\n return function equals<A, B>(a: A, b: B): boolean {\n return isEqualCustom(a, b, state as DefaultState<Meta>);\n };\n}\n"],"names":["areObjectsEqualStrictDefault","areArraysEqualDefault","areDatesEqualDefault","areMapsEqualDefault","areObjectsEqualDefault","arePrimitiveWrappersEqualDefault","areRegExpsEqualDefault","areSetsEqualDefault","areArraysEqual","areMapsEqual","areObjectsEqual","areSetsEqual"],"mappings":";;;;;;IAWQ,IAAA,mBAAmB,GAA4B,MAAM,CAAA,mBAAlC,EAAE,qBAAqB,GAAK,MAAM,CAAA,qBAAX,CAAY;IACtD,IAAA,cAAc,GAAK,MAAM,CAAC,SAAS,eAArB,CAAsB;IAE5C;;IAEG;IACa,SAAA,kBAAkB,CAChC,WAAwC,EACxC,WAAwC,EAAA;IAExC,IAAA,OAAO,SAAS,OAAO,CAAO,CAAI,EAAE,CAAI,EAAE,KAAkB,EAAA;IAC1D,QAAA,OAAO,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,IAAI,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC;IAC9D,KAAC,CAAC;IACJ,CAAC;IAED;;;IAGG;IACG,SAAU,wBAAwB,CACtC,OAAiC,EAAA;IAEjC,IAAA,OAAO,UACL,CAAM,EACN,CAAM,EACN,YAAiB,EACjB,YAAiB,EACjB,QAAa,EACb,QAAa,EACb,KAAkB,EAAA;YAElB,OAAO,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC;IAC9B,KAAC,CAAC;IACJ,CAAC;IAED;;;;IAIG;IACG,SAAU,gBAAgB,CAE9B,aAA4B,EAAA;IAC5B,IAAA,OAAO,SAAS,UAAU,CACxB,CAAM,EACN,CAAM,EACN,KAAkC,EAAA;IAElC,QAAA,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,OAAO,CAAC,KAAK,QAAQ,EAAE;gBAC9D,OAAO,aAAa,CA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