fast-equals 5.3.3-beta.1 → 5.3.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/README.md +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/types/equals.d.cts +1 -1
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/types/equals.d.mts +1 -1
- package/dist/min/index.js +1 -1
- package/dist/min/types/comparator.d.ts +1 -1
- package/dist/min/types/equals.d.ts +1 -1
- package/dist/min/types/index.d.ts +2 -2
- package/dist/min/types/utils.d.ts +1 -1
- package/dist/umd/index.js +1 -1
- package/dist/umd/index.js.map +1 -1
- package/dist/umd/types/comparator.d.ts +1 -1
- package/dist/umd/types/equals.d.ts +1 -1
- package/dist/umd/types/index.d.ts +2 -2
- package/dist/umd/types/utils.d.ts +1 -1
- package/package.json +14 -19
- package/src/comparator.ts +3 -3
- package/src/equals.ts +2 -2
- package/src/index.ts +2 -2
- package/src/utils.ts +1 -1
package/README.md
CHANGED
|
@@ -415,7 +415,7 @@ Standard practice, clone the repo and `npm i` to get the dependencies. The follo
|
|
|
415
415
|
- benchmark => run benchmark tests against other equality libraries
|
|
416
416
|
- build => build `main`, `module`, and `browser` distributables with `rollup`
|
|
417
417
|
- clean => run `rimraf` on the `dist` folder
|
|
418
|
-
- dev => start
|
|
418
|
+
- dev => start `vite` playground App
|
|
419
419
|
- dist => run `build`
|
|
420
420
|
- lint => run ESLint on all files in `src` folder (also runs on `dev` script)
|
|
421
421
|
- lint:fix => run `lint` script, but with auto-fixer
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -377,7 +377,7 @@ function createEqualityComparator(_a) {
|
|
|
377
377
|
}
|
|
378
378
|
// `isTypedArray()` works on all possible TypedArray classes, so we can avoid
|
|
379
379
|
// capturing the string tag or comparing against all possible constructors.
|
|
380
|
-
if (isTypedArray
|
|
380
|
+
if (isTypedArray != null && isTypedArray(a)) {
|
|
381
381
|
return areTypedArraysEqual(a, b, state);
|
|
382
382
|
}
|
|
383
383
|
// Try to fast-path equality checks for other complex object types in the
|
package/dist/cjs/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","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.ts';\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 { getStrictProperties, hasOwn, sameValueZeroEqual } from './utils.js';\nimport type {\n Dictionary,\n PrimitiveWrapper,\n State,\n TypedArray,\n} from './internalTypes.ts';\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 { combineComparators, createIsCircular, getShortTag } from './utils.js';\nimport type {\n ComparatorConfig,\n CreateState,\n CustomEqualCreatorOptions,\n EqualityComparator,\n InternalEqualityComparator,\n State,\n} from './internalTypes.ts';\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?.(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.ts';\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.ts';\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":";;AASQ,IAAA,mBAAmB,GAA4B,MAAM,CAAA,mBAAlC,EAAE,qBAA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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":";;AASQ,IAAA,mBAAmB,GAA4B,MAAM,CAAA,mBAAlC,EAAE,qBAAqB,GAAK,MAAM,CAAA,qBAAX;AAC1C,IAAA,cAAc,GAAK,MAAM,CAAC,SAAS,eAArB;AAEtB;;AAEG;AACG,SAAU,kBAAkB,CAChC,WAAwC,EACxC,WAAwC,EAAA;AAExC,IAAA,OAAO,SAAS,OAAO,CAAO,CAAI,EAAE,CAAI,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BAAiB,CAAC;AAC1D,IAAA,QAAQ,EAAE,IAAI;AACd,IAAA,wBAAwB,EAAE,YAAA,EAAM,OAAA,kBAAkB,EAAlB,CAAkB;AAClD,IAAA,MAAM,EAAE,IAAI;AACb,CAAA;AAED;;;;;;;AAOG;AACG,SAAU,iBAAiB,CAC/B,OAA6C,EAAA;AAA7C,IAAA,IAAA,OAAA,KAAA,MAAA,EAAA,EAAA,OAAA,GAAA,EAA6C,CAAA,CAAA;IAG3C,IAAA,EAAA,GAIE,OAAO,CAAA,QAJO,EAAhB,QAAQ,GAAA,EAAA,KAAA,MAAA,GAAG,KAAK,GAAA,EAAA,EACU,8BAA8B,GAGtD,OAAO,CAAA,wBAH+C,EACxD,WAAW,GAET,OAAO,CAAA,WAFE,EACX,EAAA,GACE,OAAO,CAAA,MADK,EAAd,MAAM,GAAA,EAAA,KAAA,MAAA,GAAG,KAAK,GAAA,EAAA;AAGhB,IAAA,IAAM,MAAM,GAAG,8BAA8B,CAAO,OAAO,CAAC;AAC5D,IAAA,IAAM,UAAU,GAAG,wBAAwB,CAAC,MAAM,CAAC;IACnD,IAAM,MAAM,GAAG;AACb,UAAE,8BAA8B,CAAC,UAAU;AAC3C,UAAE,gCAAgC,CAAC,UAAU,CAAC;AAEhD,IAAA,OAAO,aAAa,CAAC,EAAE,QAAQ,EAAA,QAAA,EAAE,UAAU,EAAA,UAAA,EAAE,WAAW,EAAA,WAAA,EAAE,MAAM,EAAA,MAAA,EAAE,MAAM,EAAA,MAAA,EAAE,CAAC;AAC7E;;;;;;;;;;;;;"}
|
package/dist/esm/index.mjs
CHANGED
|
@@ -375,7 +375,7 @@ function createEqualityComparator(_a) {
|
|
|
375
375
|
}
|
|
376
376
|
// `isTypedArray()` works on all possible TypedArray classes, so we can avoid
|
|
377
377
|
// capturing the string tag or comparing against all possible constructors.
|
|
378
|
-
if (isTypedArray
|
|
378
|
+
if (isTypedArray != null && isTypedArray(a)) {
|
|
379
379
|
return areTypedArraysEqual(a, b, state);
|
|
380
380
|
}
|
|
381
381
|
// Try to fast-path equality checks for other complex object types in the
|
package/dist/esm/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","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.ts';\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 { getStrictProperties, hasOwn, sameValueZeroEqual } from './utils.js';\nimport type {\n Dictionary,\n PrimitiveWrapper,\n State,\n TypedArray,\n} from './internalTypes.ts';\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 { combineComparators, createIsCircular, getShortTag } from './utils.js';\nimport type {\n ComparatorConfig,\n CreateState,\n CustomEqualCreatorOptions,\n EqualityComparator,\n InternalEqualityComparator,\n State,\n} from './internalTypes.ts';\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?.(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.ts';\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.ts';\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":"AASQ,IAAA,mBAAmB,GAA4B,MAAM,CAAA,mBAAlC,EAAE,qBAAqB,GAAK,MAAM,CAAA,qBAAX;AAC1C,IAAA,cAAc,GAAK,MAAM,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iBAAiB,CAAC;AACpD,IAAA,QAAQ,EAAE,IAAI;AACd,IAAA,wBAAwB,EAAE,YAAA,EAAM,OAAA,kBAAkB,EAAlB,CAAkB;AACnD,CAAA;AAED;;;AAGG;AACI,IAAM,0BAA0B,GAAG,iBAAiB,CAAC;AAC1D,IAAA,QAAQ,EAAE,IAAI;AACd,IAAA,wBAAwB,EAAE,YAAA,EAAM,OAAA,kBAAkB,EAAlB,CAAkB;AAClD,IAAA,MAAM,EAAE,IAAI;AACb,CAAA;AAED;;;;;;;AAOG;AACG,SAAU,iBAAiB,CAC/B,OAA6C,EAAA;AAA7C,IAAA,IAAA,OAAA,KAAA,MAAA,EAAA,EAAA,OAAA,GAAA,EAA6C,CAAA,CAAA;IAG3C,IAAA,EAAA,GAIE,OAAO,CAAA,QAJO,EAAhB,QAAQ,GAAA,EAAA,KAAA,MAAA,GAAG,KAAK,GAAA,EAAA,EACU,8BAA8B,GAGtD,OAAO,CAAA,wBAH+C,EACxD,WAAW,GAET,OAAO,CAAA,WAFE,EACX,EAAA,GACE,OAAO,CAAA,MADK,EAAd,MAAM,GAAA,EAAA,KAAA,MAAA,GAAG,KAAK,GAAA,EAAA;AAGhB,IAAA,IAAM,MAAM,GAAG,8BAA8B,CAAO,OAAO,CAAC;AAC5D,IAAA,IAAM,UAAU,GAAG,wBAAwB,CAAC,MAAM,CAAC;IACnD,IAAM,MAAM,GAAG;AACb,UAAE,8BAA8B,CAAC,UAAU;AAC3C,UAAE,gCAAgC,CAAC,UAAU,CAAC;AAEhD,IAAA,OAAO,aAAa,CAAC,EAAE,QAAQ,EAAA,QAAA,EAAE,UAAU,EAAA,UAAA,EAAE,WAAW,EAAA,WAAA,EAAE,MAAM,EAAA,MAAA,EAAE,MAAM,EAAA,MAAA,EAAE,CAAC;AAC7E;;;;"}
|
|
1
|
+
{"version":3,"file":"index.mjs","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":"AASQ,IAAA,mBAAmB,GAA4B,MAAM,CAAA,mBAAlC,EAAE,qBAAqB,GAAK,MAAM,CAAA,qBAAX;AAC1C,IAAA,cAAc,GAAK,MAAM,CAAC,SAAS,eAArB;AAEtB;;AAEG;AACG,SAAU,kBAAkB,CAChC,WAAwC,EACxC,WAAwC,EAAA;AAExC,IAAA,OAAO,SAAS,OAAO,CAAO,CAAI,EAAE,CAAI,EAAE,KAAkB,EAAA;AAC1D,QAAA,OAAO,WAAW,CAAC,CAAC,EAAE,CAAC,EAA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AAA,EAAM,OAAA,kBAAkB,EAAlB,CAAkB;AAClD,IAAA,MAAM,EAAE,IAAI;AACb,CAAA;AAED;;;;;;;AAOG;AACG,SAAU,iBAAiB,CAC/B,OAA6C,EAAA;AAA7C,IAAA,IAAA,OAAA,KAAA,MAAA,EAAA,EAAA,OAAA,GAAA,EAA6C,CAAA,CAAA;IAG3C,IAAA,EAAA,GAIE,OAAO,CAAA,QAJO,EAAhB,QAAQ,GAAA,EAAA,KAAA,MAAA,GAAG,KAAK,GAAA,EAAA,EACU,8BAA8B,GAGtD,OAAO,CAAA,wBAH+C,EACxD,WAAW,GAET,OAAO,CAAA,WAFE,EACX,EAAA,GACE,OAAO,CAAA,MADK,EAAd,MAAM,GAAA,EAAA,KAAA,MAAA,GAAG,KAAK,GAAA,EAAA;AAGhB,IAAA,IAAM,MAAM,GAAG,8BAA8B,CAAO,OAAO,CAAC;AAC5D,IAAA,IAAM,UAAU,GAAG,wBAAwB,CAAC,MAAM,CAAC;IACnD,IAAM,MAAM,GAAG;AACb,UAAE,8BAA8B,CAAC,UAAU;AAC3C,UAAE,gCAAgC,CAAC,UAAU,CAAC;AAEhD,IAAA,OAAO,aAAa,CAAC,EAAE,QAAQ,EAAA,QAAA,EAAE,UAAU,EAAA,UAAA,EAAE,WAAW,EAAA,WAAA,EAAE,MAAM,EAAA,MAAA,EAAE,MAAM,EAAA,MAAA,EAAE,CAAC;AAC7E;;;;"}
|
package/dist/min/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(r,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((r="undefined"!=typeof globalThis?globalThis:r||self)["fast-equals"]={})}(this,function(r){"use strict";var e=Object.getOwnPropertyNames,t=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty;function n(r,e){return function(t,a,n){return r(t,a,n)&&e(t,a,n)}}function u(r){return function(e,t,a){if(!e||!t||"object"!=typeof e||"object"!=typeof t)return r(e,t,a);var n=a.cache,u=n.get(e),o=n.get(t);if(u&&o)return u===t&&o===e;n.set(e,t),n.set(t,e);var i=r(e,t,a);return n.delete(e),n.delete(t),i}}function o(r){return e(r).concat(t(r))}var i=Object.hasOwn||function(r,e){return a.call(r,e)};function c(r,e){return r===e||!r&&!e&&r!=r&&e!=e}var l=Object.getOwnPropertyDescriptor,f=Object.keys;function s(r,e,t){var a=r.length;if(e.length!==a)return!1;for(;a-- >0;)if(!t.equals(r[a],e[a],a,a,r,e,t))return!1;return!0}function p(r,e){return c(r.getTime(),e.getTime())}function v(r,e){return r.name===e.name&&r.message===e.message&&r.cause===e.cause&&r.stack===e.stack}function q(r,e){return r===e}function E(r,e,t){var a=r.size;if(a!==e.size)return!1;if(!a)return!0;for(var n,u,o=new Array(a),i=r.entries(),c=0;(n=i.next())&&!n.done;){for(var l=e.entries(),f=!1,s=0;(u=l.next())&&!u.done;)if(o[s])s++;else{var p=n.value,v=u.value;if(t.equals(p[0],v[0],c,s,r,e,t)&&t.equals(p[1],v[1],p[0],v[0],r,e,t)){f=o[s]=!0;break}s++}if(!f)return!1;c++}return!0}var b=c;function m(r,e,t){var a=f(r),n=a.length;if(f(e).length!==n)return!1;for(;n-- >0;)if(!O(r,e,t,a[n]))return!1;return!0}function y(r,e,t){var a,n,u,i=o(r),c=i.length;if(o(e).length!==c)return!1;for(;c-- >0;){if(!O(r,e,t,a=i[c]))return!1;if(n=l(r,a),u=l(e,a),(n||u)&&(!n||!u||n.configurable!==u.configurable||n.enumerable!==u.enumerable||n.writable!==u.writable))return!1}return!0}function g(r,e){return c(r.valueOf(),e.valueOf())}function d(r,e){return r.source===e.source&&r.flags===e.flags}function h(r,e,t){var a=r.size;if(a!==e.size)return!1;if(!a)return!0;for(var n,u,o=new Array(a),i=r.values();(n=i.next())&&!n.done;){for(var c=e.values(),l=!1,f=0;(u=c.next())&&!u.done;){if(!o[f]&&t.equals(n.value,u.value,n.value,u.value,r,e,t)){l=o[f]=!0;break}f++}if(!l)return!1}return!0}function j(r,e){var t=r.length;if(e.length!==t)return!1;for(;t-- >0;)if(r[t]!==e[t])return!1;return!0}function w(r,e){return r.hostname===e.hostname&&r.pathname===e.pathname&&r.protocol===e.protocol&&r.port===e.port&&r.hash===e.hash&&r.username===e.username&&r.password===e.password}function O(r,e,t,a){return!("_owner"!==a&&"__o"!==a&&"__v"!==a||!r.$$typeof&&!e.$$typeof)||i(e,a)&&t.equals(r[a],e[a],a,a,r,e,t)}var S=Array.isArray,A="undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView:null,C=Object.assign,x=Object.prototype.toString.call.bind(Object.prototype.toString);function k(r){var e=r.areArraysEqual,t=r.areDatesEqual,a=r.areErrorsEqual,n=r.areFunctionsEqual,u=r.areMapsEqual,o=r.areNumbersEqual,i=r.areObjectsEqual,c=r.arePrimitiveWrappersEqual,l=r.areRegExpsEqual,f=r.areSetsEqual,s=r.areTypedArraysEqual,p=r.areUrlsEqual,v=r.unknownTagComparators;return function(r,q,E){if(r===q)return!0;if(null==r||null==q)return!1;var b=typeof r;if(b!==typeof q)return!1;if("object"!==b)return"number"===b?o(r,q,E):"function"===b&&n(r,q,E);var m=r.constructor;if(m!==q.constructor)return!1;if(m===Object)return i(r,q,E);if(S(r))return e(r,q,E);if(null
|
|
1
|
+
!function(r,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((r="undefined"!=typeof globalThis?globalThis:r||self)["fast-equals"]={})}(this,function(r){"use strict";var e=Object.getOwnPropertyNames,t=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty;function n(r,e){return function(t,a,n){return r(t,a,n)&&e(t,a,n)}}function u(r){return function(e,t,a){if(!e||!t||"object"!=typeof e||"object"!=typeof t)return r(e,t,a);var n=a.cache,u=n.get(e),o=n.get(t);if(u&&o)return u===t&&o===e;n.set(e,t),n.set(t,e);var i=r(e,t,a);return n.delete(e),n.delete(t),i}}function o(r){return e(r).concat(t(r))}var i=Object.hasOwn||function(r,e){return a.call(r,e)};function c(r,e){return r===e||!r&&!e&&r!=r&&e!=e}var l=Object.getOwnPropertyDescriptor,f=Object.keys;function s(r,e,t){var a=r.length;if(e.length!==a)return!1;for(;a-- >0;)if(!t.equals(r[a],e[a],a,a,r,e,t))return!1;return!0}function p(r,e){return c(r.getTime(),e.getTime())}function v(r,e){return r.name===e.name&&r.message===e.message&&r.cause===e.cause&&r.stack===e.stack}function q(r,e){return r===e}function E(r,e,t){var a=r.size;if(a!==e.size)return!1;if(!a)return!0;for(var n,u,o=new Array(a),i=r.entries(),c=0;(n=i.next())&&!n.done;){for(var l=e.entries(),f=!1,s=0;(u=l.next())&&!u.done;)if(o[s])s++;else{var p=n.value,v=u.value;if(t.equals(p[0],v[0],c,s,r,e,t)&&t.equals(p[1],v[1],p[0],v[0],r,e,t)){f=o[s]=!0;break}s++}if(!f)return!1;c++}return!0}var b=c;function m(r,e,t){var a=f(r),n=a.length;if(f(e).length!==n)return!1;for(;n-- >0;)if(!O(r,e,t,a[n]))return!1;return!0}function y(r,e,t){var a,n,u,i=o(r),c=i.length;if(o(e).length!==c)return!1;for(;c-- >0;){if(!O(r,e,t,a=i[c]))return!1;if(n=l(r,a),u=l(e,a),(n||u)&&(!n||!u||n.configurable!==u.configurable||n.enumerable!==u.enumerable||n.writable!==u.writable))return!1}return!0}function g(r,e){return c(r.valueOf(),e.valueOf())}function d(r,e){return r.source===e.source&&r.flags===e.flags}function h(r,e,t){var a=r.size;if(a!==e.size)return!1;if(!a)return!0;for(var n,u,o=new Array(a),i=r.values();(n=i.next())&&!n.done;){for(var c=e.values(),l=!1,f=0;(u=c.next())&&!u.done;){if(!o[f]&&t.equals(n.value,u.value,n.value,u.value,r,e,t)){l=o[f]=!0;break}f++}if(!l)return!1}return!0}function j(r,e){var t=r.length;if(e.length!==t)return!1;for(;t-- >0;)if(r[t]!==e[t])return!1;return!0}function w(r,e){return r.hostname===e.hostname&&r.pathname===e.pathname&&r.protocol===e.protocol&&r.port===e.port&&r.hash===e.hash&&r.username===e.username&&r.password===e.password}function O(r,e,t,a){return!("_owner"!==a&&"__o"!==a&&"__v"!==a||!r.$$typeof&&!e.$$typeof)||i(e,a)&&t.equals(r[a],e[a],a,a,r,e,t)}var S=Array.isArray,A="undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView:null,C=Object.assign,x=Object.prototype.toString.call.bind(Object.prototype.toString);function k(r){var e=r.areArraysEqual,t=r.areDatesEqual,a=r.areErrorsEqual,n=r.areFunctionsEqual,u=r.areMapsEqual,o=r.areNumbersEqual,i=r.areObjectsEqual,c=r.arePrimitiveWrappersEqual,l=r.areRegExpsEqual,f=r.areSetsEqual,s=r.areTypedArraysEqual,p=r.areUrlsEqual,v=r.unknownTagComparators;return function(r,q,E){if(r===q)return!0;if(null==r||null==q)return!1;var b=typeof r;if(b!==typeof q)return!1;if("object"!==b)return"number"===b?o(r,q,E):"function"===b&&n(r,q,E);var m=r.constructor;if(m!==q.constructor)return!1;if(m===Object)return i(r,q,E);if(S(r))return e(r,q,E);if(null!=A&&A(r))return s(r,q,E);if(m===Date)return t(r,q,E);if(m===RegExp)return l(r,q,E);if(m===Map)return u(r,q,E);if(m===Set)return f(r,q,E);var y,g=x(r);if("[object Date]"===g)return t(r,q,E);if("[object RegExp]"===g)return l(r,q,E);if("[object Map]"===g)return u(r,q,E);if("[object Set]"===g)return f(r,q,E);if("[object Object]"===g)return"function"!=typeof r.then&&"function"!=typeof q.then&&i(r,q,E);if("[object URL]"===g)return p(r,q,E);if("[object Error]"===g)return a(r,q,E);if("[object Arguments]"===g)return i(r,q,E);if("[object Boolean]"===g||"[object Number]"===g||"[object String]"===g)return c(r,q,E);if(v){var d=v[g];if(!d){var h=null!=(y=r)?y[Symbol.toStringTag]:void 0;h&&(d=v[h])}if(d)return d(r,q,E)}return!1}}var T=B(),D=B({strict:!0}),M=B({circular:!0}),P=B({circular:!0,strict:!0}),I=B({createInternalComparator:function(){return c}}),R=B({strict:!0,createInternalComparator:function(){return c}}),_=B({circular:!0,createInternalComparator:function(){return c}}),z=B({circular:!0,createInternalComparator:function(){return c},strict:!0});function B(r){void 0===r&&(r={});var e,t=r.circular,a=void 0!==t&&t,o=r.createInternalComparator,i=r.createState,c=r.strict,l=void 0!==c&&c,f=function(r){var e=r.circular,t=r.createCustomConfig,a=r.strict,o={areArraysEqual:a?y:s,areDatesEqual:p,areErrorsEqual:v,areFunctionsEqual:q,areMapsEqual:a?n(E,y):E,areNumbersEqual:b,areObjectsEqual:a?y:m,arePrimitiveWrappersEqual:g,areRegExpsEqual:d,areSetsEqual:a?n(h,y):h,areTypedArraysEqual:a?y:j,areUrlsEqual:w,unknownTagComparators:void 0};if(t&&(o=C({},o,t(o))),e){var i=u(o.areArraysEqual),c=u(o.areMapsEqual),l=u(o.areObjectsEqual),f=u(o.areSetsEqual);o=C({},o,{areArraysEqual:i,areMapsEqual:c,areObjectsEqual:l,areSetsEqual:f})}return o}(r),O=k(f);return function(r){var e=r.circular,t=r.comparator,a=r.createState,n=r.equals,u=r.strict;if(a)return function(r,o){var i=a(),c=i.cache,l=void 0===c?e?new WeakMap:void 0:c,f=i.meta;return t(r,o,{cache:l,equals:n,meta:f,strict:u})};if(e)return function(r,e){return t(r,e,{cache:new WeakMap,equals:n,meta:void 0,strict:u})};var o={cache:void 0,equals:n,meta:void 0,strict:u};return function(r,e){return t(r,e,o)}}({circular:a,comparator:O,createState:i,equals:o?o(O):(e=O,function(r,t,a,n,u,o,i){return e(r,t,i)}),strict:l})}r.circularDeepEqual=M,r.circularShallowEqual=_,r.createCustomEqual=B,r.deepEqual=T,r.sameValueZeroEqual=c,r.shallowEqual=I,r.strictCircularDeepEqual=P,r.strictCircularShallowEqual=z,r.strictDeepEqual=D,r.strictShallowEqual=R});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ComparatorConfig, CreateState, CustomEqualCreatorOptions, EqualityComparator, InternalEqualityComparator } from './internalTypes.
|
|
1
|
+
import type { ComparatorConfig, CreateState, CustomEqualCreatorOptions, EqualityComparator, InternalEqualityComparator } from './internalTypes.js';
|
|
2
2
|
interface CreateIsEqualOptions<Meta> {
|
|
3
3
|
circular: boolean;
|
|
4
4
|
comparator: EqualityComparator<Meta>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { Dictionary, PrimitiveWrapper, State, TypedArray } from './internalTypes.js';
|
|
1
2
|
import { sameValueZeroEqual } from './utils.js';
|
|
2
|
-
import type { Dictionary, PrimitiveWrapper, State, TypedArray } from './internalTypes.ts';
|
|
3
3
|
/**
|
|
4
4
|
* Whether the arrays are equal in value.
|
|
5
5
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { CustomEqualCreatorOptions } from './internalTypes.
|
|
1
|
+
import type { CustomEqualCreatorOptions } from './internalTypes.js';
|
|
2
2
|
import { sameValueZeroEqual } from './utils.js';
|
|
3
3
|
export { sameValueZeroEqual };
|
|
4
|
-
export type { AnyEqualityComparator, Cache, CircularState, ComparatorConfig, CreateCustomComparatorConfig, CreateState, CustomEqualCreatorOptions, DefaultState, Dictionary, EqualityComparator, EqualityComparatorCreator, InternalEqualityComparator, PrimitiveWrapper, State, TypeEqualityComparator, TypedArray, } from './internalTypes.
|
|
4
|
+
export type { AnyEqualityComparator, Cache, CircularState, ComparatorConfig, CreateCustomComparatorConfig, CreateState, CustomEqualCreatorOptions, DefaultState, Dictionary, EqualityComparator, EqualityComparatorCreator, InternalEqualityComparator, PrimitiveWrapper, State, TypeEqualityComparator, TypedArray, } from './internalTypes.js';
|
|
5
5
|
/**
|
|
6
6
|
* Whether the items passed are deeply-equal in value.
|
|
7
7
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AnyEqualityComparator, Dictionary, State, TypeEqualityComparator } from './internalTypes.
|
|
1
|
+
import type { AnyEqualityComparator, Dictionary, State, TypeEqualityComparator } from './internalTypes.js';
|
|
2
2
|
/**
|
|
3
3
|
* Combine two comparators into a single comparators.
|
|
4
4
|
*/
|
package/dist/umd/index.js
CHANGED
|
@@ -381,7 +381,7 @@
|
|
|
381
381
|
}
|
|
382
382
|
// `isTypedArray()` works on all possible TypedArray classes, so we can avoid
|
|
383
383
|
// capturing the string tag or comparing against all possible constructors.
|
|
384
|
-
if (isTypedArray
|
|
384
|
+
if (isTypedArray != null && isTypedArray(a)) {
|
|
385
385
|
return areTypedArraysEqual(a, b, state);
|
|
386
386
|
}
|
|
387
387
|
// Try to fast-path equality checks for other complex object types in the
|
package/dist/umd/index.js.map
CHANGED
|
@@ -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.ts';\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 { getStrictProperties, hasOwn, sameValueZeroEqual } from './utils.js';\nimport type {\n Dictionary,\n PrimitiveWrapper,\n State,\n TypedArray,\n} from './internalTypes.ts';\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 { combineComparators, createIsCircular, getShortTag } from './utils.js';\nimport type {\n ComparatorConfig,\n CreateState,\n CustomEqualCreatorOptions,\n EqualityComparator,\n InternalEqualityComparator,\n State,\n} from './internalTypes.ts';\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?.(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.ts';\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.ts';\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,qBAAqB,GAAK,MAAM,CAAA,qBAAX;IAC1C,IAAA,cAAc,GAAK,MAAM,CAAC,SAAS,eAArB;IAEtB;;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,CAE9B,aAA4B,EAAA;IAC5B,IAAA,OAAO,SAAS,UAAU,CACxB,CAAM,EACN,CAAM,EACN,KAAqC,EAAA;IAErC,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;IAEQ,QAAA,IAAA,KAAK,GAAK,KAAK,CAAA,KAAV;YAEb,IAAM,OAAO,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;YAC5B,IAAM,OAAO,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;IAE5B,QAAA,IAAI,OAAO,IAAI,OAAO,EAAE;IACtB,YAAA,OAAO,OAAO,KAAK,CAAC,IAAI,OAAO,KAAK,CAAC;YACvC;IAEA,QAAA,KAAK,CAAC,GAAG,CAAC,CAAC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IAC3C,UAAE,gCAAgC,CAAC,UAAU,CAAC;IAEhD,IAAA,OAAO,aAAa,CAAC,EAAE,QAAQ,EAAA,QAAA,EAAE,UAAU,EAAA,UAAA,EAAE,WAAW,EAAA,WAAA,EAAE,MAAM,EAAA,MAAA,EAAE,MAAM,EAAA,MAAA,EAAE,CAAC;IAC7E;;;;;;;;;;;;;;;;;"}
|
|
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","areS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,EAAA,MAAA,EAAE,CAAC;IAC7E;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ComparatorConfig, CreateState, CustomEqualCreatorOptions, EqualityComparator, InternalEqualityComparator } from './internalTypes.
|
|
1
|
+
import type { ComparatorConfig, CreateState, CustomEqualCreatorOptions, EqualityComparator, InternalEqualityComparator } from './internalTypes.js';
|
|
2
2
|
interface CreateIsEqualOptions<Meta> {
|
|
3
3
|
circular: boolean;
|
|
4
4
|
comparator: EqualityComparator<Meta>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { Dictionary, PrimitiveWrapper, State, TypedArray } from './internalTypes.js';
|
|
1
2
|
import { sameValueZeroEqual } from './utils.js';
|
|
2
|
-
import type { Dictionary, PrimitiveWrapper, State, TypedArray } from './internalTypes.ts';
|
|
3
3
|
/**
|
|
4
4
|
* Whether the arrays are equal in value.
|
|
5
5
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { CustomEqualCreatorOptions } from './internalTypes.
|
|
1
|
+
import type { CustomEqualCreatorOptions } from './internalTypes.js';
|
|
2
2
|
import { sameValueZeroEqual } from './utils.js';
|
|
3
3
|
export { sameValueZeroEqual };
|
|
4
|
-
export type { AnyEqualityComparator, Cache, CircularState, ComparatorConfig, CreateCustomComparatorConfig, CreateState, CustomEqualCreatorOptions, DefaultState, Dictionary, EqualityComparator, EqualityComparatorCreator, InternalEqualityComparator, PrimitiveWrapper, State, TypeEqualityComparator, TypedArray, } from './internalTypes.
|
|
4
|
+
export type { AnyEqualityComparator, Cache, CircularState, ComparatorConfig, CreateCustomComparatorConfig, CreateState, CustomEqualCreatorOptions, DefaultState, Dictionary, EqualityComparator, EqualityComparatorCreator, InternalEqualityComparator, PrimitiveWrapper, State, TypeEqualityComparator, TypedArray, } from './internalTypes.js';
|
|
5
5
|
/**
|
|
6
6
|
* Whether the items passed are deeply-equal in value.
|
|
7
7
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AnyEqualityComparator, Dictionary, State, TypeEqualityComparator } from './internalTypes.
|
|
1
|
+
import type { AnyEqualityComparator, Dictionary, State, TypeEqualityComparator } from './internalTypes.js';
|
|
2
2
|
/**
|
|
3
3
|
* Combine two comparators into a single comparators.
|
|
4
4
|
*/
|
package/package.json
CHANGED
|
@@ -12,42 +12,37 @@
|
|
|
12
12
|
"@rollup/plugin-terser": "^0.4.4",
|
|
13
13
|
"@rollup/plugin-typescript": "^12.3.0",
|
|
14
14
|
"@types/lodash": "^4.17.20",
|
|
15
|
-
"@types/node": "^24.10.
|
|
15
|
+
"@types/node": "^24.10.1",
|
|
16
16
|
"@types/ramda": "^0.31.1",
|
|
17
|
-
"@types/react": "^19.2.
|
|
18
|
-
"@types/react-dom": "^19.2.
|
|
19
|
-
"@typescript-eslint/eslint-plugin": "^8.46.
|
|
20
|
-
"@typescript-eslint/parser": "^8.46.
|
|
21
|
-
"@vitest/coverage-v8": "4.0.
|
|
17
|
+
"@types/react": "^19.2.3",
|
|
18
|
+
"@types/react-dom": "^19.2.3",
|
|
19
|
+
"@typescript-eslint/eslint-plugin": "^8.46.4",
|
|
20
|
+
"@typescript-eslint/parser": "^8.46.4",
|
|
21
|
+
"@vitest/coverage-v8": "4.0.8",
|
|
22
22
|
"decircularize": "^1.0.0",
|
|
23
23
|
"deep-eql": "^5.0.2",
|
|
24
24
|
"deep-equal": "^2.2.3",
|
|
25
25
|
"dequal": "^2.0.3",
|
|
26
26
|
"eslint": "^9.39.1",
|
|
27
27
|
"eslint-friendly-formatter": "^4.0.1",
|
|
28
|
-
"eslint-
|
|
28
|
+
"eslint-plugin-import": "^2.32.0",
|
|
29
29
|
"fast-deep-equal": "^3.1.3",
|
|
30
30
|
"fast-glob": "^3.3.3",
|
|
31
|
-
"html-webpack-plugin": "^5.6.4",
|
|
32
|
-
"in-publish": "^2.0.1",
|
|
33
31
|
"lodash": "^4.17.21",
|
|
34
32
|
"nano-equal": "^2.0.2",
|
|
35
33
|
"prettier": "^3.6.2",
|
|
36
34
|
"react": "^19.2.0",
|
|
37
35
|
"react-dom": "^19.2.0",
|
|
38
36
|
"react-fast-compare": "^3.2.2",
|
|
39
|
-
"release-it": "^19.0.
|
|
40
|
-
"rollup": "^4.
|
|
37
|
+
"release-it": "^19.0.6",
|
|
38
|
+
"rollup": "^4.53.2",
|
|
41
39
|
"shallow-equal-fuzzy": "^0.0.2",
|
|
42
40
|
"tinybench": "^5.1.0",
|
|
43
|
-
"ts-loader": "^9.5.4",
|
|
44
41
|
"typescript": "^5.9.3",
|
|
45
|
-
"typescript-eslint": "^8.46.
|
|
42
|
+
"typescript-eslint": "^8.46.4",
|
|
46
43
|
"underscore": "^1.13.7",
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"webpack-cli": "^6.0.1",
|
|
50
|
-
"webpack-dev-server": "^5.2.2"
|
|
44
|
+
"vite": "^7.2.2",
|
|
45
|
+
"vitest": "^4.0.8"
|
|
51
46
|
},
|
|
52
47
|
"engines": {
|
|
53
48
|
"node": ">=6.0.0"
|
|
@@ -101,7 +96,7 @@
|
|
|
101
96
|
"build:min": "rm -rf dist/min && NODE_ENV=production rollup -c config/rollup/config.min.js && tsc -p ./config/tsconfig/min.json",
|
|
102
97
|
"build:types": "node scripts/fallback-types.js",
|
|
103
98
|
"build:umd": "rm -rf dist/umd && NODE_ENV=production rollup -c config/rollup/config.umd.js && tsc -p ./config/tsconfig/umd.json",
|
|
104
|
-
"dev": "
|
|
99
|
+
"dev": "vite --config config/vite.config.js",
|
|
105
100
|
"format": "prettier **/*.ts --write",
|
|
106
101
|
"lint": "eslint src/*.ts",
|
|
107
102
|
"lint:fix": "npm run lint -- --fix",
|
|
@@ -117,5 +112,5 @@
|
|
|
117
112
|
"sideEffects": false,
|
|
118
113
|
"type": "module",
|
|
119
114
|
"types": "./index.d.ts",
|
|
120
|
-
"version": "5.3.3
|
|
115
|
+
"version": "5.3.3"
|
|
121
116
|
}
|
package/src/comparator.ts
CHANGED
|
@@ -13,7 +13,6 @@ import {
|
|
|
13
13
|
areTypedArraysEqual as areTypedArraysEqualDefault,
|
|
14
14
|
areUrlsEqual as areUrlsEqualDefault,
|
|
15
15
|
} from './equals.js';
|
|
16
|
-
import { combineComparators, createIsCircular, getShortTag } from './utils.js';
|
|
17
16
|
import type {
|
|
18
17
|
ComparatorConfig,
|
|
19
18
|
CreateState,
|
|
@@ -21,7 +20,8 @@ import type {
|
|
|
21
20
|
EqualityComparator,
|
|
22
21
|
InternalEqualityComparator,
|
|
23
22
|
State,
|
|
24
|
-
} from './internalTypes.
|
|
23
|
+
} from './internalTypes.js';
|
|
24
|
+
import { combineComparators, createIsCircular, getShortTag } from './utils.js';
|
|
25
25
|
|
|
26
26
|
const ARGUMENTS_TAG = '[object Arguments]';
|
|
27
27
|
const BOOLEAN_TAG = '[object Boolean]';
|
|
@@ -137,7 +137,7 @@ export function createEqualityComparator<Meta>({
|
|
|
137
137
|
|
|
138
138
|
// `isTypedArray()` works on all possible TypedArray classes, so we can avoid
|
|
139
139
|
// capturing the string tag or comparing against all possible constructors.
|
|
140
|
-
if (isTypedArray
|
|
140
|
+
if (isTypedArray != null && isTypedArray(a)) {
|
|
141
141
|
return areTypedArraysEqual(a, b, state);
|
|
142
142
|
}
|
|
143
143
|
|
package/src/equals.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { getStrictProperties, hasOwn, sameValueZeroEqual } from './utils.js';
|
|
2
1
|
import type {
|
|
3
2
|
Dictionary,
|
|
4
3
|
PrimitiveWrapper,
|
|
5
4
|
State,
|
|
6
5
|
TypedArray,
|
|
7
|
-
} from './internalTypes.
|
|
6
|
+
} from './internalTypes.js';
|
|
7
|
+
import { getStrictProperties, hasOwn, sameValueZeroEqual } from './utils.js';
|
|
8
8
|
|
|
9
9
|
const PREACT_VNODE = '__v';
|
|
10
10
|
const PREACT_OWNER = '__o';
|
package/src/index.ts
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
createInternalEqualityComparator,
|
|
5
5
|
createIsEqual,
|
|
6
6
|
} from './comparator.js';
|
|
7
|
-
import type { CustomEqualCreatorOptions } from './internalTypes.
|
|
7
|
+
import type { CustomEqualCreatorOptions } from './internalTypes.js';
|
|
8
8
|
import { sameValueZeroEqual } from './utils.js';
|
|
9
9
|
|
|
10
10
|
export { sameValueZeroEqual };
|
|
@@ -25,7 +25,7 @@ export type {
|
|
|
25
25
|
State,
|
|
26
26
|
TypeEqualityComparator,
|
|
27
27
|
TypedArray,
|
|
28
|
-
} from './internalTypes.
|
|
28
|
+
} from './internalTypes.js';
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
31
|
* Whether the items passed are deeply-equal in value.
|
package/src/utils.ts
CHANGED