fast-equals 5.3.3 → 5.4.0

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.
Files changed (41) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +128 -77
  3. package/dist/cjs/comparator.d.cts +60 -0
  4. package/dist/cjs/{types/equals.d.cts → equals.d.cts} +8 -0
  5. package/dist/cjs/index.cjs +171 -162
  6. package/dist/cjs/index.cjs.map +1 -1
  7. package/dist/cjs/{types/index.d.cts → index.d.cts} +21 -2
  8. package/{src/internalTypes.ts → dist/cjs/internalTypes.d.cts} +18 -50
  9. package/dist/cjs/{types/utils.d.cts → utils.d.cts} +7 -2
  10. package/dist/es/comparator.d.mts +60 -0
  11. package/dist/{esm/types → es}/equals.d.mts +8 -0
  12. package/dist/{esm/types → es}/index.d.mts +21 -2
  13. package/dist/{esm → es}/index.mjs +171 -162
  14. package/dist/es/index.mjs.map +1 -0
  15. package/dist/es/internalTypes.d.mts +178 -0
  16. package/dist/{esm/types → es}/utils.d.mts +7 -2
  17. package/dist/{min/types → umd}/comparator.d.ts +2 -2
  18. package/dist/{min/types → umd}/equals.d.ts +8 -0
  19. package/dist/umd/index.js +171 -162
  20. package/dist/umd/index.js.map +1 -1
  21. package/dist/{min/types → umd}/internalTypes.d.ts +10 -8
  22. package/index.d.ts +73 -75
  23. package/package.json +45 -48
  24. package/CHANGELOG.md +0 -364
  25. package/dist/cjs/types/comparator.d.cts +0 -26
  26. package/dist/cjs/types/internalTypes.d.cts +0 -157
  27. package/dist/esm/index.mjs.map +0 -1
  28. package/dist/esm/types/comparator.d.mts +0 -26
  29. package/dist/esm/types/internalTypes.d.mts +0 -157
  30. package/dist/min/index.js +0 -1
  31. package/dist/umd/types/comparator.d.ts +0 -26
  32. package/dist/umd/types/equals.d.ts +0 -54
  33. package/dist/umd/types/index.d.ts +0 -47
  34. package/dist/umd/types/internalTypes.d.ts +0 -157
  35. package/dist/umd/types/utils.d.ts +0 -28
  36. package/src/comparator.ts +0 -376
  37. package/src/equals.ts +0 -355
  38. package/src/index.ts +0 -112
  39. package/src/utils.ts +0 -96
  40. /package/dist/{min/types → umd}/index.d.ts +0 -0
  41. /package/dist/{min/types → umd}/utils.d.ts +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/utils.ts","../../../src/equals.ts","../../../src/comparator.ts","../../../src/index.ts"],"sourcesContent":["import type {\n AnyEqualityComparator,\n Cache,\n CircularState,\n Dictionary,\n State,\n TypeEqualityComparator,\n} from './internalTypes.js';\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 * 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<Cache<any, any>>,\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 `@@toStringTag` of the value, if it exists.\n */\nexport function getShortTag(value: any): string | undefined {\n return value != null ? value[Symbol.toStringTag] : undefined;\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 // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\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 !== a && b !== b);\n}\n","import type {\n Dictionary,\n PrimitiveWrapper,\n State,\n TypedArray,\n} from './internalTypes.js';\nimport { getStrictProperties, hasOwn, sameValueZeroEqual } from './utils.js';\n\nconst PREACT_VNODE = '__v';\nconst PREACT_OWNER = '__o';\nconst REACT_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 errors passed are equal in value.\n */\nexport function areErrorsEqual(a: Error, b: Error): boolean {\n return (\n a.name === b.name &&\n a.message === b.message &&\n a.cause === b.cause &&\n a.stack === b.stack\n );\n}\n\n/**\n * Whether the functions passed are equal in value.\n */\nexport function areFunctionsEqual(\n a: (...args: any[]) => any,\n b: (...args: any[]) => any,\n): boolean {\n return a === b;\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 const size = a.size;\n\n if (size !== b.size) {\n return false;\n }\n\n if (!size) {\n return true;\n }\n\n const matchedIndices = new Array<true | undefined>(size);\n const aIterable = a.entries();\n\n let aResult: IteratorResult<[any, any]>;\n let bResult: IteratorResult<[any, any]>;\n let index = 0;\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n while ((aResult = aIterable.next())) {\n if (aResult.done) {\n break;\n }\n\n const bIterable = b.entries();\n\n let hasMatch = false;\n let matchIndex = 0;\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n while ((bResult = bIterable.next())) {\n if (bResult.done) {\n break;\n }\n\n if (matchedIndices[matchIndex]) {\n matchIndex++;\n continue;\n }\n\n const aEntry = aResult.value;\n const bEntry = bResult.value;\n\n if (\n state.equals(aEntry[0], bEntry[0], index, matchIndex, a, b, state) &&\n state.equals(aEntry[1], bEntry[1], aEntry[0], bEntry[0], a, b, state)\n ) {\n hasMatch = matchedIndices[matchIndex] = true;\n break;\n }\n\n matchIndex++;\n }\n\n if (!hasMatch) {\n return false;\n }\n\n index++;\n }\n\n return true;\n}\n\n/**\n * Whether the numbers are equal in value.\n */\nexport const areNumbersEqual = sameValueZeroEqual;\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 // 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 if (!isPropertyEqual(a, b, state, properties[index]!)) {\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 (!isPropertyEqual(a, b, state, property)) {\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(\n a: PrimitiveWrapper,\n b: PrimitiveWrapper,\n): 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 const size = a.size;\n\n if (size !== b.size) {\n return false;\n }\n\n if (!size) {\n return true;\n }\n\n const matchedIndices = new Array<true | undefined>(size);\n const aIterable = a.values();\n\n let aResult: IteratorResult<any>;\n let bResult: IteratorResult<any>;\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n while ((aResult = aIterable.next())) {\n if (aResult.done) {\n break;\n }\n\n const bIterable = b.values();\n\n let hasMatch = false;\n let matchIndex = 0;\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n while ((bResult = bIterable.next())) {\n if (bResult.done) {\n break;\n }\n\n if (\n !matchedIndices[matchIndex] &&\n state.equals(\n aResult.value,\n bResult.value,\n aResult.value,\n bResult.value,\n a,\n b,\n state,\n )\n ) {\n hasMatch = matchedIndices[matchIndex] = true;\n break;\n }\n\n matchIndex++;\n }\n\n if (!hasMatch) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * Whether the TypedArray instances are equal in value.\n */\nexport function areTypedArraysEqual(a: TypedArray, b: TypedArray) {\n let index = a.length;\n\n if (b.length !== index) {\n return false;\n }\n\n while (index-- > 0) {\n if (a[index] !== b[index]) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * Whether the URL instances are equal in value.\n */\nexport function areUrlsEqual(a: URL, b: URL): boolean {\n return (\n a.hostname === b.hostname &&\n a.pathname === b.pathname &&\n a.protocol === b.protocol &&\n a.port === b.port &&\n a.hash === b.hash &&\n a.username === b.username &&\n a.password === b.password\n );\n}\n\nfunction isPropertyEqual(\n a: Dictionary,\n b: Dictionary,\n state: State<any>,\n property: string | symbol,\n) {\n if (\n (property === REACT_OWNER ||\n property === PREACT_OWNER ||\n property === PREACT_VNODE) &&\n (a.$$typeof || b.$$typeof)\n ) {\n return true;\n }\n\n return (\n hasOwn(b, property) &&\n state.equals(a[property], b[property], property, property, a, b, state)\n );\n}\n","import {\n areArraysEqual as areArraysEqualDefault,\n areDatesEqual as areDatesEqualDefault,\n areErrorsEqual as areErrorsEqualDefault,\n areFunctionsEqual as areFunctionsEqualDefault,\n areMapsEqual as areMapsEqualDefault,\n areNumbersEqual as areNumbersEqualDefault,\n areObjectsEqual as areObjectsEqualDefault,\n areObjectsEqualStrict as areObjectsEqualStrictDefault,\n arePrimitiveWrappersEqual as arePrimitiveWrappersEqualDefault,\n areRegExpsEqual as areRegExpsEqualDefault,\n areSetsEqual as areSetsEqualDefault,\n areTypedArraysEqual as areTypedArraysEqualDefault,\n areUrlsEqual as areUrlsEqualDefault,\n} from './equals.js';\nimport type {\n ComparatorConfig,\n CreateState,\n CustomEqualCreatorOptions,\n EqualityComparator,\n InternalEqualityComparator,\n State,\n} from './internalTypes.js';\nimport { combineComparators, createIsCircular, getShortTag } from './utils.js';\n\nconst ARGUMENTS_TAG = '[object Arguments]';\nconst BOOLEAN_TAG = '[object Boolean]';\nconst DATE_TAG = '[object Date]';\nconst ERROR_TAG = '[object Error]';\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]';\nconst URL_TAG = '[object URL]';\n\nconst { isArray } = Array;\nconst isTypedArray =\n typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function'\n ? ArrayBuffer.isView\n : null;\nconst { assign } = Object;\nconst getTag = Object.prototype.toString.call.bind(\n Object.prototype.toString,\n) as (a: object) => string;\n\ninterface CreateIsEqualOptions<Meta> {\n circular: boolean;\n comparator: EqualityComparator<Meta>;\n createState: CreateState<Meta> | undefined;\n equals: InternalEqualityComparator<Meta>;\n strict: boolean;\n}\n\n/**\n * Create a comparator method based on the type-specific equality comparators passed.\n */\nexport function createEqualityComparator<Meta>({\n areArraysEqual,\n areDatesEqual,\n areErrorsEqual,\n areFunctionsEqual,\n areMapsEqual,\n areNumbersEqual,\n areObjectsEqual,\n arePrimitiveWrappersEqual,\n areRegExpsEqual,\n areSetsEqual,\n areTypedArraysEqual,\n areUrlsEqual,\n unknownTagComparators,\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 either of the items are nullish and fail the strictly equal check\n // above, then they must be unequal.\n if (a == null || b == null) {\n return false;\n }\n\n const type = typeof a;\n\n if (type !== typeof b) {\n return false;\n }\n\n if (type !== 'object') {\n if (type === 'number') {\n return areNumbersEqual(a, b, state);\n }\n\n if (type === 'function') {\n return areFunctionsEqual(a, b, state);\n }\n\n // If a primitive value that is not strictly equal, it must be unequal.\n return false;\n }\n\n const constructor = a.constructor;\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 // Constructors should match, otherwise there is potential for false positives\n // between class and subclass or custom object and POJO.\n if (constructor !== b.constructor) {\n return false;\n }\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 capturing the string tag.\n if (constructor === Object) {\n return areObjectsEqual(a, b, state);\n }\n\n // `isArray()` works on subclasses and is cross-realm, so we can avoid capturing\n // the string tag or doing an `instanceof` check.\n if (isArray(a)) {\n return areArraysEqual(a, b, state);\n }\n\n // `isTypedArray()` works on all possible TypedArray classes, so we can avoid\n // capturing the string tag or comparing against all possible constructors.\n if (isTypedArray != null && isTypedArray(a)) {\n return areTypedArraysEqual(a, b, state);\n }\n\n // Try to fast-path equality checks for other complex object types in the\n // same realm to avoid capturing the string tag. Strict equality is used\n // instead of `instanceof` because it is more performant for the common\n // use-case. If someone is subclassing a native class, it will be handled\n // with the string tag comparison.\n\n if (constructor === Date) {\n return areDatesEqual(a, b, state);\n }\n\n if (constructor === RegExp) {\n return areRegExpsEqual(a, b, state);\n }\n\n if (constructor === Map) {\n return areMapsEqual(a, b, state);\n }\n\n if (constructor === Set) {\n return areSetsEqual(a, b, state);\n }\n\n // Since this is a custom object, capture the string tag to determing its type.\n // This is reasonably performant in modern environments like v8 and SpiderMonkey.\n const tag = getTag(a as object);\n\n if (tag === DATE_TAG) {\n return areDatesEqual(a, b, state);\n }\n\n // For RegExp, the properties are not enumerable, and therefore will give false positives if\n // tested like a standard object.\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 (tag === OBJECT_TAG) {\n // The exception for value comparison is custom `Promise`-like class instances. These should\n // be 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 a URL tag, it should be tested explicitly. Like RegExp, the properties are not\n // enumerable, and therefore will give false positives if tested like a standard object.\n if (tag === URL_TAG) {\n return areUrlsEqual(a, b, state);\n }\n\n // If an error tag, it should be tested explicitly. Like RegExp, the properties are not\n // enumerable, and therefore will give false positives if tested like a standard object.\n if (tag === ERROR_TAG) {\n return areErrorsEqual(a, b, state);\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 (unknownTagComparators) {\n let unknownTagComparator = unknownTagComparators[tag];\n\n if (!unknownTagComparator) {\n const shortTag = getShortTag(a);\n\n if (shortTag) {\n unknownTagComparator = unknownTagComparators[shortTag];\n }\n }\n\n // If the custom config has an unknown tag comparator that matches the captured tag or the\n // @@toStringTag, it is the source of truth for whether the values are equal.\n if (unknownTagComparator) {\n return unknownTagComparator(a, b, state);\n }\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 createEqualityComparatorConfig<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 areErrorsEqual: areErrorsEqualDefault,\n areFunctionsEqual: areFunctionsEqualDefault,\n areMapsEqual: strict\n ? combineComparators(areMapsEqualDefault, areObjectsEqualStrictDefault)\n : areMapsEqualDefault,\n areNumbersEqual: areNumbersEqualDefault,\n areObjectsEqual: strict\n ? areObjectsEqualStrictDefault\n : areObjectsEqualDefault,\n arePrimitiveWrappersEqual: arePrimitiveWrappersEqualDefault,\n areRegExpsEqual: areRegExpsEqualDefault,\n areSetsEqual: strict\n ? combineComparators(areSetsEqualDefault, areObjectsEqualStrictDefault)\n : areSetsEqualDefault,\n areTypedArraysEqual: strict\n ? areObjectsEqualStrictDefault\n : areTypedArraysEqualDefault,\n areUrlsEqual: areUrlsEqualDefault,\n unknownTagComparators: undefined,\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\n/**\n * Default equality comparator pass-through, used as the standard `isEqual` creator for\n * use inside the built comparator.\n */\nexport function createInternalEqualityComparator<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 * Create the `isEqual` function used by the consuming application.\n */\nexport function createIsEqual<Meta>({\n circular,\n comparator,\n createState,\n equals,\n strict,\n}: CreateIsEqualOptions<Meta>) {\n if (createState) {\n return function isEqual<A, B>(a: A, b: B): boolean {\n const { cache = circular ? new WeakMap() : undefined, meta } =\n createState();\n\n return comparator(a, b, {\n cache,\n equals,\n meta,\n strict,\n } as State<Meta>);\n };\n }\n\n if (circular) {\n return function isEqual<A, B>(a: A, b: B): boolean {\n return comparator(a, b, {\n cache: new WeakMap(),\n equals,\n meta: undefined as Meta,\n strict,\n } as State<Meta>);\n };\n }\n\n const state = {\n cache: undefined,\n equals,\n meta: undefined,\n strict,\n } as State<Meta>;\n\n return function isEqual<A, B>(a: A, b: B): boolean {\n return comparator(a, b, state);\n };\n}\n","import {\n createEqualityComparatorConfig,\n createEqualityComparator,\n createInternalEqualityComparator,\n createIsEqual,\n} from './comparator.js';\nimport type { CustomEqualCreatorOptions } from './internalTypes.js';\nimport { sameValueZeroEqual } from './utils.js';\n\nexport { sameValueZeroEqual };\nexport type {\n AnyEqualityComparator,\n Cache,\n CircularState,\n ComparatorConfig,\n CreateCustomComparatorConfig,\n CreateState,\n CustomEqualCreatorOptions,\n DefaultState,\n Dictionary,\n EqualityComparator,\n EqualityComparatorCreator,\n InternalEqualityComparator,\n PrimitiveWrapper,\n State,\n TypeEqualityComparator,\n TypedArray,\n} from './internalTypes.js';\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 createInternalComparator: () => sameValueZeroEqual,\n});\n\n/**\n * Whether the items passed are shallowly-equal in value based on strict comparison\n */\nexport const strictShallowEqual = createCustomEqual({\n strict: true,\n createInternalComparator: () => sameValueZeroEqual,\n});\n\n/**\n * Whether the items passed are shallowly-equal in value, including circular references.\n */\nexport const circularShallowEqual = createCustomEqual({\n circular: true,\n createInternalComparator: () => sameValueZeroEqual,\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 circular: true,\n createInternalComparator: () => sameValueZeroEqual,\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 = undefined>(\n options: CustomEqualCreatorOptions<Meta> = {},\n) {\n const {\n circular = false,\n createInternalComparator: createCustomInternalComparator,\n createState,\n strict = false,\n } = options;\n\n const config = createEqualityComparatorConfig<Meta>(options);\n const comparator = createEqualityComparator(config);\n const equals = createCustomInternalComparator\n ? createCustomInternalComparator(comparator)\n : createInternalEqualityComparator(comparator);\n\n return createIsEqual({ circular, comparator, createState, equals, strict });\n}\n"],"names":["areObjectsEqualStrictDefault","areArraysEqualDefault","areDatesEqualDefault","areErrorsEqualDefault","areFunctionsEqualDefault","areMapsEqualDefault","areNumbersEqualDefault","areObjectsEqualDefault","arePrimitiveWrappersEqualDefault","areRegExpsEqualDefault","areSetsEqualDefault","areTypedArraysEqualDefault","areUrlsEqualDefault","areArraysEqual","areMapsEqual","areObjectsEqual","areSetsEqual"],"mappings":";;;;;;IASQ,IAAA,mBAAmB,GAA4B,MAAM,CAAA,mBAAlC,EAAE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js","sources":["../../../src/utils.ts","../../../src/equals.ts","../../../src/comparator.ts","../../../src/index.ts"],"sourcesContent":["import type {\n AnyEqualityComparator,\n Cache,\n CircularState,\n Dictionary,\n State,\n TypeEqualityComparator,\n} from './internalTypes.js';\n\nconst { getOwnPropertyNames, getOwnPropertySymbols } = Object;\n// eslint-disable-next-line @typescript-eslint/unbound-method\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 * 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<AreItemsEqual extends TypeEqualityComparator<any, any>>(\n areItemsEqual: AreItemsEqual,\n): AreItemsEqual {\n return function isCircular(a: any, b: any, state: CircularState<Cache<any, any>>) {\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 `@@toStringTag` of the value, if it exists.\n */\nexport function getShortTag(value: any): string | undefined {\n return value != null ? (value[Symbol.toStringTag] as string) : undefined;\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(object: Dictionary): Array<string | symbol> {\n return (getOwnPropertyNames(object) as Array<string | symbol>).concat(getOwnPropertySymbols(object));\n}\n\n/**\n * Whether the object contains the property passed as an own property.\n */\nexport const hasOwn =\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n Object.hasOwn || ((object: Dictionary, property: number | string | symbol) => 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 !== a && b !== b);\n}\n","import type { Dictionary, PrimitiveWrapper, State, TypedArray } from './internalTypes.js';\nimport { getStrictProperties, hasOwn, sameValueZeroEqual } from './utils.js';\n\nconst PREACT_VNODE = '__v';\nconst PREACT_OWNER = '__o';\nconst REACT_OWNER = '_owner';\n\nconst { getOwnPropertyDescriptor, keys } = Object;\n\n/**\n * Whether the array buffers are equal in value.\n */\nexport function areArrayBuffersEqual(a: ArrayBuffer, b: ArrayBuffer): boolean {\n return a.byteLength === b.byteLength && areTypedArraysEqual(new Uint8Array(a), new Uint8Array(b));\n}\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 dataviews are equal in value.\n */\nexport function areDataViewsEqual(a: DataView, b: DataView): boolean {\n return (\n a.byteLength === b.byteLength\n && areTypedArraysEqual(\n new Uint8Array(a.buffer, a.byteOffset, a.byteLength),\n new Uint8Array(b.buffer, b.byteOffset, b.byteLength),\n )\n );\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 errors passed are equal in value.\n */\nexport function areErrorsEqual(a: Error, b: Error): boolean {\n return a.name === b.name && a.message === b.message && a.cause === b.cause && a.stack === b.stack;\n}\n\n/**\n * Whether the functions passed are equal in value.\n */\nexport function areFunctionsEqual(a: (...args: any[]) => any, b: (...args: any[]) => any): boolean {\n return a === b;\n}\n\n/**\n * Whether the `Map`s are equal in value.\n */\nexport function areMapsEqual(a: Map<any, any>, b: Map<any, any>, state: State<any>): boolean {\n const size = a.size;\n\n if (size !== b.size) {\n return false;\n }\n\n if (!size) {\n return true;\n }\n\n const matchedIndices = new Array<true | undefined>(size);\n const aIterable = a.entries();\n\n let aResult: IteratorResult<[any, any]>;\n let bResult: IteratorResult<[any, any]>;\n let index = 0;\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n while ((aResult = aIterable.next())) {\n if (aResult.done) {\n break;\n }\n\n const bIterable = b.entries();\n\n let hasMatch = false;\n let matchIndex = 0;\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n while ((bResult = bIterable.next())) {\n if (bResult.done) {\n break;\n }\n\n if (matchedIndices[matchIndex]) {\n matchIndex++;\n continue;\n }\n\n const aEntry = aResult.value;\n const bEntry = bResult.value;\n\n if (\n state.equals(aEntry[0], bEntry[0], index, matchIndex, a, b, state)\n && state.equals(aEntry[1], bEntry[1], aEntry[0], bEntry[0], a, b, state)\n ) {\n hasMatch = matchedIndices[matchIndex] = true;\n break;\n }\n\n matchIndex++;\n }\n\n if (!hasMatch) {\n return false;\n }\n\n index++;\n }\n\n return true;\n}\n\n/**\n * Whether the numbers are equal in value.\n */\nexport const areNumbersEqual = sameValueZeroEqual;\n\n/**\n * Whether the objects are equal in value.\n */\nexport function areObjectsEqual(a: Dictionary, b: Dictionary, state: State<any>): 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 // 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 if (!isPropertyEqual(a, b, state, properties[index]!)) {\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(a: Dictionary, b: Dictionary, state: State<any>): 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 (!isPropertyEqual(a, b, state, property)) {\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: PrimitiveWrapper, b: PrimitiveWrapper): 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(a: Set<any>, b: Set<any>, state: State<any>): boolean {\n const size = a.size;\n\n if (size !== b.size) {\n return false;\n }\n\n if (!size) {\n return true;\n }\n\n const matchedIndices = new Array<true | undefined>(size);\n const aIterable = a.values();\n\n let aResult: IteratorResult<any>;\n let bResult: IteratorResult<any>;\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n while ((aResult = aIterable.next())) {\n if (aResult.done) {\n break;\n }\n\n const bIterable = b.values();\n\n let hasMatch = false;\n let matchIndex = 0;\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n while ((bResult = bIterable.next())) {\n if (bResult.done) {\n break;\n }\n\n if (\n !matchedIndices[matchIndex]\n && state.equals(aResult.value, bResult.value, aResult.value, bResult.value, a, b, state)\n ) {\n hasMatch = matchedIndices[matchIndex] = true;\n break;\n }\n\n matchIndex++;\n }\n\n if (!hasMatch) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * Whether the TypedArray instances are equal in value.\n */\nexport function areTypedArraysEqual(a: TypedArray, b: TypedArray) {\n let index = a.byteLength;\n\n if (b.byteLength !== index || a.byteOffset !== b.byteOffset) {\n return false;\n }\n\n while (index-- > 0) {\n if (a[index] !== b[index]) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * Whether the URL instances are equal in value.\n */\nexport function areUrlsEqual(a: URL, b: URL): boolean {\n return (\n a.hostname === b.hostname\n && a.pathname === b.pathname\n && a.protocol === b.protocol\n && a.port === b.port\n && a.hash === b.hash\n && a.username === b.username\n && a.password === b.password\n );\n}\n\nfunction isPropertyEqual(a: Dictionary, b: Dictionary, state: State<any>, property: string | symbol) {\n if (\n (property === REACT_OWNER || property === PREACT_OWNER || property === PREACT_VNODE)\n && (a.$$typeof || b.$$typeof)\n ) {\n return true;\n }\n\n return hasOwn(b, property) && state.equals(a[property], b[property], property, property, a, b, state);\n}\n","import {\n areArrayBuffersEqual,\n areArraysEqual as areArraysEqualDefault,\n areDataViewsEqual,\n areDatesEqual as areDatesEqualDefault,\n areErrorsEqual as areErrorsEqualDefault,\n areFunctionsEqual as areFunctionsEqualDefault,\n areMapsEqual as areMapsEqualDefault,\n areNumbersEqual as areNumbersEqualDefault,\n areObjectsEqual as areObjectsEqualDefault,\n areObjectsEqualStrict as areObjectsEqualStrictDefault,\n arePrimitiveWrappersEqual as arePrimitiveWrappersEqualDefault,\n areRegExpsEqual as areRegExpsEqualDefault,\n areSetsEqual as areSetsEqualDefault,\n areTypedArraysEqual as areTypedArraysEqualDefault,\n areUrlsEqual as areUrlsEqualDefault,\n} from './equals.js';\nimport type {\n ComparatorConfig,\n CreateState,\n CustomEqualCreatorOptions,\n EqualityComparator,\n InternalEqualityComparator,\n State,\n} from './internalTypes.js';\nimport { combineComparators, createIsCircular, getShortTag } from './utils.js';\n\nconst ARRAY_BUFFER_TAG = '[object ArrayBuffer]';\nconst ARGUMENTS_TAG = '[object Arguments]';\nconst BOOLEAN_TAG = '[object Boolean]';\nconst DATA_VIEW_TAG = '[object DataView]';\nconst DATE_TAG = '[object Date]';\nconst ERROR_TAG = '[object Error]';\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]';\nconst TYPED_ARRAY_TAGS: Record<string, boolean> = {\n '[object Int8Array]': true,\n '[object Uint8Array]': true,\n '[object Uint8ClampedArray]': true,\n '[object Int16Array]': true,\n '[object Uint16Array]': true,\n '[object Int32Array]': true,\n '[object Uint32Array]': true,\n '[object Float16Array]': true,\n '[object Float32Array]': true,\n '[object Float64Array]': true,\n '[object BigInt64Array]': true,\n '[object BigUint64Array]': true,\n};\nconst URL_TAG = '[object URL]';\n\n// eslint-disable-next-line @typescript-eslint/unbound-method\nconst toString = Object.prototype.toString;\n\ninterface CreateIsEqualOptions<Meta> {\n circular: boolean;\n comparator: EqualityComparator<Meta>;\n createState: CreateState<Meta> | undefined;\n equals: InternalEqualityComparator<Meta>;\n strict: boolean;\n}\n\n/**\n * Create a comparator method based on the type-specific equality comparators passed.\n */\nexport function createEqualityComparator<Meta>({\n areArrayBuffersEqual,\n areArraysEqual,\n areDataViewsEqual,\n areDatesEqual,\n areErrorsEqual,\n areFunctionsEqual,\n areMapsEqual,\n areNumbersEqual,\n areObjectsEqual,\n arePrimitiveWrappersEqual,\n areRegExpsEqual,\n areSetsEqual,\n areTypedArraysEqual,\n areUrlsEqual,\n unknownTagComparators,\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 either of the items are nullish and fail the strictly equal check\n // above, then they must be unequal.\n if (a == null || b == null) {\n return false;\n }\n\n const type = typeof a;\n\n if (type !== typeof b) {\n return false;\n }\n\n if (type !== 'object') {\n if (type === 'number') {\n return areNumbersEqual(a, b, state);\n }\n\n if (type === 'function') {\n return areFunctionsEqual(a, b, state);\n }\n\n // If a primitive value that is not strictly equal, it must be unequal.\n return false;\n }\n\n const constructor = a.constructor;\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 // Constructors should match, otherwise there is potential for false positives\n // between class and subclass or custom object and POJO.\n if (constructor !== b.constructor) {\n return false;\n }\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 capturing the string tag.\n if (constructor === Object) {\n return areObjectsEqual(a, b, state);\n }\n\n // `isArray()` works on subclasses and is cross-realm, so we can avoid capturing\n // the string tag or doing an `instanceof` check.\n if (Array.isArray(a)) {\n return areArraysEqual(a, b, state);\n }\n\n // Try to fast-path equality checks for other complex object types in the\n // same realm to avoid capturing the string tag. Strict equality is used\n // instead of `instanceof` because it is more performant for the common\n // use-case. If someone is subclassing a native class, it will be handled\n // with the string tag comparison.\n\n if (constructor === Date) {\n return areDatesEqual(a, b, state);\n }\n\n if (constructor === RegExp) {\n return areRegExpsEqual(a, b, state);\n }\n\n if (constructor === Map) {\n return areMapsEqual(a, b, state);\n }\n\n if (constructor === Set) {\n return areSetsEqual(a, b, state);\n }\n\n // Since this is a custom object, capture the string tag to determing its type.\n // This is reasonably performant in modern environments like v8 and SpiderMonkey.\n const tag = toString.call(a);\n\n if (tag === DATE_TAG) {\n return areDatesEqual(a, b, state);\n }\n\n // For RegExp, the properties are not enumerable, and therefore will give false positives if\n // tested like a standard object.\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 (tag === OBJECT_TAG) {\n // The exception for value comparison is custom `Promise`-like class instances. These should\n // be 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 typeof a.then !== 'function' && typeof b.then !== 'function' && areObjectsEqual(a, b, state);\n }\n\n // If a URL tag, it should be tested explicitly. Like RegExp, the properties are not\n // enumerable, and therefore will give false positives if tested like a standard object.\n if (tag === URL_TAG) {\n return areUrlsEqual(a, b, state);\n }\n\n // If an error tag, it should be tested explicitly. Like RegExp, the properties are not\n // enumerable, and therefore will give false positives if tested like a standard object.\n if (tag === ERROR_TAG) {\n return areErrorsEqual(a, b, state);\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 if (TYPED_ARRAY_TAGS[tag]) {\n return areTypedArraysEqual(a, b, state);\n }\n\n if (tag === ARRAY_BUFFER_TAG) {\n return areArrayBuffersEqual(a, b, state);\n }\n\n if (tag === DATA_VIEW_TAG) {\n return areDataViewsEqual(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 (unknownTagComparators) {\n let unknownTagComparator = unknownTagComparators[tag];\n\n if (!unknownTagComparator) {\n const shortTag = getShortTag(a);\n\n if (shortTag) {\n unknownTagComparator = unknownTagComparators[shortTag];\n }\n }\n\n // If the custom config has an unknown tag comparator that matches the captured tag or the\n // @@toStringTag, it is the source of truth for whether the values are equal.\n if (unknownTagComparator) {\n return unknownTagComparator(a, b, state);\n }\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 createEqualityComparatorConfig<Meta>({\n circular,\n createCustomConfig,\n strict,\n}: CustomEqualCreatorOptions<Meta>): ComparatorConfig<Meta> {\n let config = {\n areArrayBuffersEqual,\n areArraysEqual: strict ? areObjectsEqualStrictDefault : areArraysEqualDefault,\n areDataViewsEqual,\n areDatesEqual: areDatesEqualDefault,\n areErrorsEqual: areErrorsEqualDefault,\n areFunctionsEqual: areFunctionsEqualDefault,\n areMapsEqual: strict ? combineComparators(areMapsEqualDefault, areObjectsEqualStrictDefault) : areMapsEqualDefault,\n areNumbersEqual: areNumbersEqualDefault,\n areObjectsEqual: strict ? areObjectsEqualStrictDefault : areObjectsEqualDefault,\n arePrimitiveWrappersEqual: arePrimitiveWrappersEqualDefault,\n areRegExpsEqual: areRegExpsEqualDefault,\n areSetsEqual: strict ? combineComparators(areSetsEqualDefault, areObjectsEqualStrictDefault) : areSetsEqualDefault,\n areTypedArraysEqual: strict\n ? combineComparators(areTypedArraysEqualDefault, areObjectsEqualStrictDefault)\n : areTypedArraysEqualDefault,\n areUrlsEqual: areUrlsEqualDefault,\n unknownTagComparators: undefined,\n };\n\n if (createCustomConfig) {\n config = Object.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 = Object.assign({}, config, {\n areArraysEqual,\n areMapsEqual,\n areObjectsEqual,\n areSetsEqual,\n });\n }\n\n return config;\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 createInternalEqualityComparator<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 * Create the `isEqual` function used by the consuming application.\n */\nexport function createIsEqual<Meta>({ circular, comparator, createState, equals, strict }: CreateIsEqualOptions<Meta>) {\n if (createState) {\n return function isEqual<A, B>(a: A, b: B): boolean {\n const { cache = circular ? new WeakMap() : undefined, meta } = createState();\n\n return comparator(a, b, {\n cache,\n equals,\n meta,\n strict,\n } as State<Meta>);\n };\n }\n\n if (circular) {\n return function isEqual<A, B>(a: A, b: B): boolean {\n return comparator(a, b, {\n cache: new WeakMap(),\n equals,\n meta: undefined as Meta,\n strict,\n } as State<Meta>);\n };\n }\n\n const state = {\n cache: undefined,\n equals,\n meta: undefined,\n strict,\n } as State<Meta>;\n\n return function isEqual<A, B>(a: A, b: B): boolean {\n return comparator(a, b, state);\n };\n}\n","import {\n createEqualityComparatorConfig,\n createEqualityComparator,\n createInternalEqualityComparator,\n createIsEqual,\n} from './comparator.js';\nimport type { CustomEqualCreatorOptions } from './internalTypes.js';\nimport { sameValueZeroEqual } from './utils.js';\n\nexport { sameValueZeroEqual };\nexport type {\n AnyEqualityComparator,\n Cache,\n CircularState,\n ComparatorConfig,\n CreateCustomComparatorConfig,\n CreateState,\n CustomEqualCreatorOptions,\n DefaultState,\n Dictionary,\n EqualityComparator,\n EqualityComparatorCreator,\n InternalEqualityComparator,\n PrimitiveWrapper,\n State,\n TypeEqualityComparator,\n TypedArray,\n} from './internalTypes.js';\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 createInternalComparator: () => sameValueZeroEqual,\n});\n\n/**\n * Whether the items passed are shallowly-equal in value based on strict comparison\n */\nexport const strictShallowEqual = createCustomEqual({\n strict: true,\n createInternalComparator: () => sameValueZeroEqual,\n});\n\n/**\n * Whether the items passed are shallowly-equal in value, including circular references.\n */\nexport const circularShallowEqual = createCustomEqual({\n circular: true,\n createInternalComparator: () => sameValueZeroEqual,\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 circular: true,\n createInternalComparator: () => sameValueZeroEqual,\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 = undefined>(options: CustomEqualCreatorOptions<Meta> = {}) {\n const {\n circular = false,\n createInternalComparator: createCustomInternalComparator,\n createState,\n strict = false,\n } = options;\n\n const config = createEqualityComparatorConfig<Meta>(options);\n const comparator = createEqualityComparator(config);\n const equals = createCustomInternalComparator\n ? createCustomInternalComparator(comparator)\n : createInternalEqualityComparator(comparator);\n\n return createIsEqual({ circular, comparator, createState, equals, strict });\n}\n"],"names":["areObjectsEqualStrictDefault","areArraysEqualDefault","areDatesEqualDefault","areErrorsEqualDefault","areFunctionsEqualDefault","areMapsEqualDefault","areNumbersEqualDefault","areObjectsEqualDefault","arePrimitiveWrappersEqualDefault","areRegExpsEqualDefault","areSetsEqualDefault","areTypedArraysEqualDefault","areUrlsEqualDefault"],"mappings":";;;;;;IASA,MAAM,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,GAAG,MAAM;IAC7D;IACA,MAAM,EAAE,cAAc,EAAE,GAAG,MAAM,CAAC,SAAS;IAE3C;;IAEG;IACG,SAAU,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;IAC7D,IAAA,CAAC;IACH;IAEA;;;;IAIG;IACG,SAAU,gBAAgB,CAC9B,aAA4B,EAAA;IAE5B,IAAA,OAAO,SAAS,UAAU,CAAC,CAAM,EAAE,CAAM,EAAE,KAAqC,EAAA;IAC9E,QAAA,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,OAAO,CAAC,KAAK,QAAQ,EAAE;gBAC9D,OAAO,aAAa,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC;YACnC;IAEA,QAAA,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK;YAEvB,MAAM,OAAO,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;YAC5B,MAAM,OAAO,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;IAE5B,QAAA,IAAI,OAAO,IAAI,OAAO,EAAE;IACtB,YAAA,OAAO,OAAO,KAAK,CA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AC,UAAU,CAAC;IAEhD,IAAA,OAAO,aAAa,CAAC,EAAE,QAAQ,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;IAC7E;;;;;;;;;;;;;;;;;"}
@@ -38,11 +38,20 @@ export interface Dictionary<Value = any> {
38
38
  $$typeof?: any;
39
39
  }
40
40
  export interface ComparatorConfig<Meta> {
41
+ /**
42
+ * Whether the array buffers passed are equal in value. In strict mode, this includes
43
+ * additional properties added to the array.
44
+ */
45
+ areArrayBuffersEqual: TypeEqualityComparator<any, Meta>;
41
46
  /**
42
47
  * Whether the arrays passed are equal in value. In strict mode, this includes
43
48
  * additional properties added to the array.
44
49
  */
45
50
  areArraysEqual: TypeEqualityComparator<any, Meta>;
51
+ /**
52
+ * Whether the data views passed are equal in value.
53
+ */
54
+ areDataViewsEqual: TypeEqualityComparator<any, Meta>;
46
55
  /**
47
56
  * Whether the dates passed are equal in value.
48
57
  */
@@ -112,15 +121,8 @@ export type PrimitiveWrapper = Boolean | Number | String;
112
121
  /**
113
122
  * Type which encompasses possible instances of TypedArray
114
123
  * classes.
115
- *
116
- * **NOTE**: This does not include `BigInt64Array` and
117
- * `BitUint64Array` because those are part of ES2020 and
118
- * not supported by certain TS configurations. If using
119
- * either in `areTypedArraysEqual`, you can cast the
120
- * instance as `TypedArray` and it will work as expected,
121
- * because runtime checks will still work for those classes.
122
124
  */
123
- export type TypedArray = Float32Array | Float64Array | Int8Array | Int16Array | Int32Array | Uint16Array | Uint32Array | Uint8Array | Uint8ClampedArray;
125
+ export type TypedArray = BigInt64Array | BigUint64Array | Float32Array | Float64Array | Int8Array | Int16Array | Int32Array | Uint16Array | Uint32Array | Uint8Array | Uint8ClampedArray;
124
126
  export type TypeEqualityComparator<Type, Meta = undefined> = (a: Type, b: Type, state: State<Meta>) => boolean;
125
127
  export interface CustomEqualCreatorOptions<Meta> {
126
128
  /**
package/index.d.ts CHANGED
@@ -2,13 +2,12 @@
2
2
  * Cache used to store references to objects, used for circular
3
3
  * reference checks.
4
4
  */
5
- export interface Cache<Key extends object, Value> {
5
+ interface Cache<Key extends object, Value> {
6
6
  delete(key: Key): boolean;
7
7
  get(key: Key): Value | undefined;
8
8
  set(key: Key, value: any): any;
9
9
  }
10
-
11
- export interface State<Meta> {
10
+ interface State<Meta> {
12
11
  /**
13
12
  * Cache used to identify circular references
14
13
  */
@@ -28,26 +27,31 @@ export interface State<Meta> {
28
27
  */
29
28
  readonly strict: boolean;
30
29
  }
31
-
32
- export interface CircularState<Meta> extends State<Meta> {
30
+ interface CircularState<Meta> extends State<Meta> {
33
31
  readonly cache: Cache<any, any>;
34
32
  }
35
-
36
- export interface DefaultState<Meta> extends State<Meta> {
33
+ interface DefaultState<Meta> extends State<Meta> {
37
34
  readonly cache: undefined;
38
35
  }
39
-
40
- export interface Dictionary<Value = any> {
36
+ interface Dictionary<Value = any> {
41
37
  [key: string | symbol]: Value;
42
38
  $$typeof?: any;
43
39
  }
44
-
45
- export interface ComparatorConfig<Meta> {
40
+ interface ComparatorConfig<Meta> {
41
+ /**
42
+ * Whether the array buffers passed are equal in value. In strict mode, this includes
43
+ * additional properties added to the array.
44
+ */
45
+ areArrayBuffersEqual: TypeEqualityComparator<any, Meta>;
46
46
  /**
47
47
  * Whether the arrays passed are equal in value. In strict mode, this includes
48
48
  * additional properties added to the array.
49
49
  */
50
50
  areArraysEqual: TypeEqualityComparator<any, Meta>;
51
+ /**
52
+ * Whether the data views passed are equal in value.
53
+ */
54
+ areDataViewsEqual: TypeEqualityComparator<any, Meta>;
51
55
  /**
52
56
  * Whether the dates passed are equal in value.
53
57
  */
@@ -102,36 +106,17 @@ export interface ComparatorConfig<Meta> {
102
106
  *
103
107
  * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/toStringTag
104
108
  */
105
- unknownTagComparators:
106
- | Record<string, TypeEqualityComparator<any, Meta>>
107
- | undefined;
109
+ unknownTagComparators: Record<string, TypeEqualityComparator<any, Meta>> | undefined;
108
110
  }
109
-
110
- export type CreateCustomComparatorConfig<Meta> = (
111
- config: ComparatorConfig<Meta>,
112
- ) => Partial<ComparatorConfig<Meta>>;
113
-
114
- export type CreateState<Meta> = () => {
111
+ type CreateCustomComparatorConfig<Meta> = (config: ComparatorConfig<Meta>) => Partial<ComparatorConfig<Meta>>;
112
+ type CreateState<Meta> = () => {
115
113
  cache?: Cache<any, any> | undefined;
116
114
  meta?: Meta;
117
115
  };
118
-
119
- export type EqualityComparator<Meta> = <A, B>(
120
- a: A,
121
- b: B,
122
- state: State<Meta>,
123
- ) => boolean;
124
- export type AnyEqualityComparator<Meta> = (
125
- a: any,
126
- b: any,
127
- state: State<Meta>,
128
- ) => boolean;
129
-
130
- export type EqualityComparatorCreator<Meta> = (
131
- fn: EqualityComparator<Meta>,
132
- ) => InternalEqualityComparator<Meta>;
133
-
134
- export type InternalEqualityComparator<Meta> = (
116
+ type EqualityComparator<Meta> = <A, B>(a: A, b: B, state: State<Meta>) => boolean;
117
+ type AnyEqualityComparator<Meta> = (a: any, b: any, state: State<Meta>) => boolean;
118
+ type EqualityComparatorCreator<Meta> = (fn: EqualityComparator<Meta>) => InternalEqualityComparator<Meta>;
119
+ type InternalEqualityComparator<Meta> = (
135
120
  a: any,
136
121
  b: any,
137
122
  indexOrKeyA: any,
@@ -140,23 +125,14 @@ export type InternalEqualityComparator<Meta> = (
140
125
  parentB: any,
141
126
  state: State<Meta>,
142
127
  ) => boolean;
143
-
144
- // We explicitly check for primitive wrapper types
145
- // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types
146
- export type PrimitiveWrapper = Boolean | Number | String;
147
-
128
+ type PrimitiveWrapper = Boolean | Number | String;
148
129
  /**
149
130
  * Type which encompasses possible instances of TypedArray
150
131
  * classes.
151
- *
152
- * **NOTE**: This does not include `BigInt64Array` and
153
- * `BitUint64Array` because those are part of ES2020 and
154
- * not supported by certain TS configurations. If using
155
- * either in `areTypedArraysEqual`, you can cast the
156
- * instance as `TypedArray` and it will work as expected,
157
- * because runtime checks will still work for those classes.
158
132
  */
159
- export type TypedArray =
133
+ type TypedArray =
134
+ | BigInt64Array
135
+ | BigUint64Array
160
136
  | Float32Array
161
137
  | Float64Array
162
138
  | Int8Array
@@ -166,14 +142,8 @@ export type TypedArray =
166
142
  | Uint32Array
167
143
  | Uint8Array
168
144
  | Uint8ClampedArray;
169
-
170
- export type TypeEqualityComparator<Type, Meta = undefined> = (
171
- a: Type,
172
- b: Type,
173
- state: State<Meta>,
174
- ) => boolean;
175
-
176
- export interface CustomEqualCreatorOptions<Meta> {
145
+ type TypeEqualityComparator<Type, Meta = undefined> = (a: Type, b: Type, state: State<Meta>) => boolean;
146
+ interface CustomEqualCreatorOptions<Meta> {
177
147
  /**
178
148
  * Whether circular references should be supported. It causes the
179
149
  * comparison to be slower, but for objects that have circular references
@@ -193,9 +163,7 @@ export interface CustomEqualCreatorOptions<Meta> {
193
163
  * class instance differently than other objects) or to incorporate `meta` in
194
164
  * the comparison. See the recipes for examples.
195
165
  */
196
- createInternalComparator?: (
197
- compare: EqualityComparator<Meta>,
198
- ) => InternalEqualityComparator<Meta>;
166
+ createInternalComparator?: (compare: EqualityComparator<Meta>) => InternalEqualityComparator<Meta>;
199
167
  /**
200
168
  * Create a custom `state` object passed between the methods. This allows for
201
169
  * custom `cache` and/or `meta` values to be used.
@@ -209,54 +177,84 @@ export interface CustomEqualCreatorOptions<Meta> {
209
177
  strict?: boolean;
210
178
  }
211
179
 
212
-
213
180
  /**
214
181
  * Whether the values passed are strictly equal or both NaN.
215
182
  */
216
- export declare const sameValueZeroEqual: <A, B>(a: A, b: B) => boolean;
183
+ declare function sameValueZeroEqual(a: any, b: any): boolean;
217
184
 
218
185
  /**
219
186
  * Whether the items passed are deeply-equal in value.
220
187
  */
221
- export declare const deepEqual: <A, B>(a: A, b: B) => boolean;
188
+ declare const deepEqual: <A, B>(a: A, b: B) => boolean;
222
189
  /**
223
190
  * Whether the items passed are deeply-equal in value based on strict comparison.
224
191
  */
225
- export declare const strictDeepEqual: <A, B>(a: A, b: B) => boolean;
192
+ declare const strictDeepEqual: <A, B>(a: A, b: B) => boolean;
226
193
  /**
227
194
  * Whether the items passed are deeply-equal in value, including circular references.
228
195
  */
229
- export declare const circularDeepEqual: <A, B>(a: A, b: B) => boolean;
196
+ declare const circularDeepEqual: <A, B>(a: A, b: B) => boolean;
230
197
  /**
231
198
  * Whether the items passed are deeply-equal in value, including circular references,
232
199
  * based on strict comparison.
233
200
  */
234
- export declare const strictCircularDeepEqual: <A, B>(a: A, b: B) => boolean;
201
+ declare const strictCircularDeepEqual: <A, B>(a: A, b: B) => boolean;
235
202
  /**
236
203
  * Whether the items passed are shallowly-equal in value.
237
204
  */
238
- export declare const shallowEqual: <A, B>(a: A, b: B) => boolean;
205
+ declare const shallowEqual: <A, B>(a: A, b: B) => boolean;
239
206
  /**
240
207
  * Whether the items passed are shallowly-equal in value based on strict comparison
241
208
  */
242
- export declare const strictShallowEqual: <A, B>(a: A, b: B) => boolean;
209
+ declare const strictShallowEqual: <A, B>(a: A, b: B) => boolean;
243
210
  /**
244
211
  * Whether the items passed are shallowly-equal in value, including circular references.
245
212
  */
246
- export declare const circularShallowEqual: <A, B>(a: A, b: B) => boolean;
213
+ declare const circularShallowEqual: <A, B>(a: A, b: B) => boolean;
247
214
  /**
248
215
  * Whether the items passed are shallowly-equal in value, including circular references,
249
216
  * based on strict comparison.
250
217
  */
251
- export declare const strictCircularShallowEqual: <A, B>(a: A, b: B) => boolean;
218
+ declare const strictCircularShallowEqual: <A, B>(a: A, b: B) => boolean;
252
219
  /**
253
220
  * Create a custom equality comparison method.
254
221
  *
255
222
  * This can be done to create very targeted comparisons in extreme hot-path scenarios
256
223
  * where the standard methods are not performant enough, but can also be used to provide
257
- * support for legacy environments that cannot polyfill for modern features expected by
258
- * `fast-equals`, such as `WeakMap` or `RegExp.prototype.flags`.
224
+ * support for legacy environments that do not support expected features like
225
+ * `RegExp.prototype.flags` out of the box.
259
226
  */
260
- export declare function createCustomEqual<Meta = undefined>(
227
+ declare function createCustomEqual<Meta = undefined>(
261
228
  options?: CustomEqualCreatorOptions<Meta>,
262
- ): <A, B>(a: A, b: B) => boolean;
229
+ ): <A, B>(a: A, b: B) => boolean;
230
+
231
+ export {
232
+ circularDeepEqual,
233
+ circularShallowEqual,
234
+ createCustomEqual,
235
+ deepEqual,
236
+ sameValueZeroEqual,
237
+ shallowEqual,
238
+ strictCircularDeepEqual,
239
+ strictCircularShallowEqual,
240
+ strictDeepEqual,
241
+ strictShallowEqual,
242
+ };
243
+ export type {
244
+ AnyEqualityComparator,
245
+ Cache,
246
+ CircularState,
247
+ ComparatorConfig,
248
+ CreateCustomComparatorConfig,
249
+ CreateState,
250
+ CustomEqualCreatorOptions,
251
+ DefaultState,
252
+ Dictionary,
253
+ EqualityComparator,
254
+ EqualityComparatorCreator,
255
+ InternalEqualityComparator,
256
+ PrimitiveWrapper,
257
+ State,
258
+ TypeEqualityComparator,
259
+ TypedArray,
260
+ };