fast-equals 5.4.0 → 5.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/index.d.cts +177 -32
- package/dist/es/index.d.mts +177 -32
- package/dist/es/index.mjs.map +1 -1
- package/dist/umd/index.d.ts +177 -13
- package/dist/umd/index.js.map +1 -1
- package/index.d.ts +132 -181
- package/package.json +32 -25
- package/dist/cjs/comparator.d.cts +0 -60
- package/dist/cjs/equals.d.cts +0 -62
- package/dist/cjs/internalTypes.d.cts +0 -178
- package/dist/cjs/utils.d.cts +0 -33
- package/dist/es/comparator.d.mts +0 -60
- package/dist/es/equals.d.mts +0 -62
- package/dist/es/internalTypes.d.mts +0 -178
- package/dist/es/utils.d.mts +0 -33
- package/dist/umd/comparator.d.ts +0 -26
- package/dist/umd/equals.d.ts +0 -62
- package/dist/umd/internalTypes.d.ts +0 -159
- package/dist/umd/utils.d.ts +0 -28
package/index.d.ts
CHANGED
|
@@ -3,178 +3,159 @@
|
|
|
3
3
|
* reference checks.
|
|
4
4
|
*/
|
|
5
5
|
interface Cache<Key extends object, Value> {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
delete(key: Key): boolean;
|
|
7
|
+
get(key: Key): Value | undefined;
|
|
8
|
+
set(key: Key, value: any): any;
|
|
9
9
|
}
|
|
10
10
|
interface State<Meta> {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
11
|
+
/**
|
|
12
|
+
* Cache used to identify circular references
|
|
13
|
+
*/
|
|
14
|
+
readonly cache: Cache<any, any> | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* Method used to determine equality of nested value.
|
|
17
|
+
*/
|
|
18
|
+
readonly equals: InternalEqualityComparator<Meta>;
|
|
19
|
+
/**
|
|
20
|
+
* Additional value that can be used for comparisons.
|
|
21
|
+
*/
|
|
22
|
+
meta: Meta;
|
|
23
|
+
/**
|
|
24
|
+
* Whether the equality comparison is strict, meaning it matches
|
|
25
|
+
* all properties (including symbols and non-enumerable properties)
|
|
26
|
+
* with equal shape of descriptors.
|
|
27
|
+
*/
|
|
28
|
+
readonly strict: boolean;
|
|
29
29
|
}
|
|
30
30
|
interface CircularState<Meta> extends State<Meta> {
|
|
31
|
-
|
|
31
|
+
readonly cache: Cache<any, any>;
|
|
32
32
|
}
|
|
33
33
|
interface DefaultState<Meta> extends State<Meta> {
|
|
34
|
-
|
|
34
|
+
readonly cache: undefined;
|
|
35
35
|
}
|
|
36
36
|
interface Dictionary<Value = any> {
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
[key: string | symbol]: Value;
|
|
38
|
+
$$typeof?: any;
|
|
39
39
|
}
|
|
40
40
|
interface ComparatorConfig<Meta> {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
41
|
+
/**
|
|
42
|
+
* Whether the array buffers passed are equal in value. In strict mode, this includes
|
|
43
|
+
* additional properties added to the array.
|
|
44
|
+
*/
|
|
45
|
+
areArrayBuffersEqual: TypeEqualityComparator<any, Meta>;
|
|
46
|
+
/**
|
|
47
|
+
* Whether the arrays passed are equal in value. In strict mode, this includes
|
|
48
|
+
* additional properties added to the array.
|
|
49
|
+
*/
|
|
50
|
+
areArraysEqual: TypeEqualityComparator<any, Meta>;
|
|
51
|
+
/**
|
|
52
|
+
* Whether the data views passed are equal in value.
|
|
53
|
+
*/
|
|
54
|
+
areDataViewsEqual: TypeEqualityComparator<any, Meta>;
|
|
55
|
+
/**
|
|
56
|
+
* Whether the dates passed are equal in value.
|
|
57
|
+
*/
|
|
58
|
+
areDatesEqual: TypeEqualityComparator<any, Meta>;
|
|
59
|
+
/**
|
|
60
|
+
* Whether the errors passed are equal in value.
|
|
61
|
+
*/
|
|
62
|
+
areErrorsEqual: TypeEqualityComparator<any, Meta>;
|
|
63
|
+
/**
|
|
64
|
+
* Whether the functions passed are equal in value.
|
|
65
|
+
*/
|
|
66
|
+
areFunctionsEqual: TypeEqualityComparator<any, Meta>;
|
|
67
|
+
/**
|
|
68
|
+
* Whether the maps passed are equal in value. In strict mode, this includes
|
|
69
|
+
* additional properties added to the map.
|
|
70
|
+
*/
|
|
71
|
+
areMapsEqual: TypeEqualityComparator<any, Meta>;
|
|
72
|
+
/**
|
|
73
|
+
* Whether the numbers passed are equal in value.
|
|
74
|
+
*/
|
|
75
|
+
areNumbersEqual: TypeEqualityComparator<any, Meta>;
|
|
76
|
+
/**
|
|
77
|
+
* Whether the objects passed are equal in value. In strict mode, this includes
|
|
78
|
+
* non-enumerable properties added to the map, as well as symbol properties.
|
|
79
|
+
*/
|
|
80
|
+
areObjectsEqual: TypeEqualityComparator<any, Meta>;
|
|
81
|
+
/**
|
|
82
|
+
* Whether the primitive wrappers passed are equal in value.
|
|
83
|
+
*/
|
|
84
|
+
arePrimitiveWrappersEqual: TypeEqualityComparator<any, Meta>;
|
|
85
|
+
/**
|
|
86
|
+
* Whether the regexps passed are equal in value.
|
|
87
|
+
*/
|
|
88
|
+
areRegExpsEqual: TypeEqualityComparator<any, Meta>;
|
|
89
|
+
/**
|
|
90
|
+
* Whether the sets passed are equal in value. In strict mode, this includes
|
|
91
|
+
* additional properties added to the set.
|
|
92
|
+
*/
|
|
93
|
+
areSetsEqual: TypeEqualityComparator<any, Meta>;
|
|
94
|
+
/**
|
|
95
|
+
* Whether the typed arrays passed are equal in value. In strict mode, this includes
|
|
96
|
+
* additional properties added to the typed array.
|
|
97
|
+
*/
|
|
98
|
+
areTypedArraysEqual: TypeEqualityComparator<any, Meta>;
|
|
99
|
+
/**
|
|
100
|
+
* Whether the URLs passed are equal in value.
|
|
101
|
+
*/
|
|
102
|
+
areUrlsEqual: TypeEqualityComparator<any, Meta>;
|
|
103
|
+
/**
|
|
104
|
+
* Whether two values with unknown `@@toStringTag` are equal in value. This comparator is
|
|
105
|
+
* called when no other comparator applies.
|
|
106
|
+
*
|
|
107
|
+
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/toStringTag
|
|
108
|
+
*/
|
|
109
|
+
unknownTagComparators: Record<string, TypeEqualityComparator<any, Meta>> | undefined;
|
|
110
110
|
}
|
|
111
111
|
type CreateCustomComparatorConfig<Meta> = (config: ComparatorConfig<Meta>) => Partial<ComparatorConfig<Meta>>;
|
|
112
112
|
type CreateState<Meta> = () => {
|
|
113
|
-
|
|
114
|
-
|
|
113
|
+
cache?: Cache<any, any> | undefined;
|
|
114
|
+
meta?: Meta;
|
|
115
115
|
};
|
|
116
116
|
type EqualityComparator<Meta> = <A, B>(a: A, b: B, state: State<Meta>) => boolean;
|
|
117
117
|
type AnyEqualityComparator<Meta> = (a: any, b: any, state: State<Meta>) => boolean;
|
|
118
118
|
type EqualityComparatorCreator<Meta> = (fn: EqualityComparator<Meta>) => InternalEqualityComparator<Meta>;
|
|
119
|
-
type InternalEqualityComparator<Meta> = (
|
|
120
|
-
a: any,
|
|
121
|
-
b: any,
|
|
122
|
-
indexOrKeyA: any,
|
|
123
|
-
indexOrKeyB: any,
|
|
124
|
-
parentA: any,
|
|
125
|
-
parentB: any,
|
|
126
|
-
state: State<Meta>,
|
|
127
|
-
) => boolean;
|
|
119
|
+
type InternalEqualityComparator<Meta> = (a: any, b: any, indexOrKeyA: any, indexOrKeyB: any, parentA: any, parentB: any, state: State<Meta>) => boolean;
|
|
128
120
|
type PrimitiveWrapper = Boolean | Number | String;
|
|
129
121
|
/**
|
|
130
122
|
* Type which encompasses possible instances of TypedArray
|
|
131
123
|
* classes.
|
|
132
124
|
*/
|
|
133
|
-
type TypedArray =
|
|
134
|
-
| BigInt64Array
|
|
135
|
-
| BigUint64Array
|
|
136
|
-
| Float32Array
|
|
137
|
-
| Float64Array
|
|
138
|
-
| Int8Array
|
|
139
|
-
| Int16Array
|
|
140
|
-
| Int32Array
|
|
141
|
-
| Uint16Array
|
|
142
|
-
| Uint32Array
|
|
143
|
-
| Uint8Array
|
|
144
|
-
| Uint8ClampedArray;
|
|
125
|
+
type TypedArray = BigInt64Array | BigUint64Array | Float32Array | Float64Array | Int8Array | Int16Array | Int32Array | Uint16Array | Uint32Array | Uint8Array | Uint8ClampedArray;
|
|
145
126
|
type TypeEqualityComparator<Type, Meta = undefined> = (a: Type, b: Type, state: State<Meta>) => boolean;
|
|
146
127
|
interface CustomEqualCreatorOptions<Meta> {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
128
|
+
/**
|
|
129
|
+
* Whether circular references should be supported. It causes the
|
|
130
|
+
* comparison to be slower, but for objects that have circular references
|
|
131
|
+
* it is required to avoid stack overflows.
|
|
132
|
+
*/
|
|
133
|
+
circular?: boolean;
|
|
134
|
+
/**
|
|
135
|
+
* Create a custom configuration of type-specific equality comparators.
|
|
136
|
+
* This receives the default configuration, which allows either replacement
|
|
137
|
+
* or supersetting of the default methods.
|
|
138
|
+
*/
|
|
139
|
+
createCustomConfig?: CreateCustomComparatorConfig<Meta>;
|
|
140
|
+
/**
|
|
141
|
+
* Create a custom internal comparator, which is used as an override to the
|
|
142
|
+
* default entry point for nested value equality comparisons. This is often
|
|
143
|
+
* used for doing custom logic for specific types (such as handling a specific
|
|
144
|
+
* class instance differently than other objects) or to incorporate `meta` in
|
|
145
|
+
* the comparison. See the recipes for examples.
|
|
146
|
+
*/
|
|
147
|
+
createInternalComparator?: (compare: EqualityComparator<Meta>) => InternalEqualityComparator<Meta>;
|
|
148
|
+
/**
|
|
149
|
+
* Create a custom `state` object passed between the methods. This allows for
|
|
150
|
+
* custom `cache` and/or `meta` values to be used.
|
|
151
|
+
*/
|
|
152
|
+
createState?: CreateState<Meta>;
|
|
153
|
+
/**
|
|
154
|
+
* Whether the equality comparison is strict, meaning it matches
|
|
155
|
+
* all properties (including symbols and non-enumerable properties)
|
|
156
|
+
* with equal shape of descriptors.
|
|
157
|
+
*/
|
|
158
|
+
strict?: boolean;
|
|
178
159
|
}
|
|
179
160
|
|
|
180
161
|
/**
|
|
@@ -224,37 +205,7 @@ declare const strictCircularShallowEqual: <A, B>(a: A, b: B) => boolean;
|
|
|
224
205
|
* support for legacy environments that do not support expected features like
|
|
225
206
|
* `RegExp.prototype.flags` out of the box.
|
|
226
207
|
*/
|
|
227
|
-
declare function createCustomEqual<Meta = undefined>(
|
|
228
|
-
options?: CustomEqualCreatorOptions<Meta>,
|
|
229
|
-
): <A, B>(a: A, b: B) => boolean;
|
|
208
|
+
declare function createCustomEqual<Meta = undefined>(options?: CustomEqualCreatorOptions<Meta>): <A, B>(a: A, b: B) => boolean;
|
|
230
209
|
|
|
231
|
-
export {
|
|
232
|
-
|
|
233
|
-
circularShallowEqual,
|
|
234
|
-
createCustomEqual,
|
|
235
|
-
deepEqual,
|
|
236
|
-
sameValueZeroEqual,
|
|
237
|
-
shallowEqual,
|
|
238
|
-
strictCircularDeepEqual,
|
|
239
|
-
strictCircularShallowEqual,
|
|
240
|
-
strictDeepEqual,
|
|
241
|
-
strictShallowEqual,
|
|
242
|
-
};
|
|
243
|
-
export type {
|
|
244
|
-
AnyEqualityComparator,
|
|
245
|
-
Cache,
|
|
246
|
-
CircularState,
|
|
247
|
-
ComparatorConfig,
|
|
248
|
-
CreateCustomComparatorConfig,
|
|
249
|
-
CreateState,
|
|
250
|
-
CustomEqualCreatorOptions,
|
|
251
|
-
DefaultState,
|
|
252
|
-
Dictionary,
|
|
253
|
-
EqualityComparator,
|
|
254
|
-
EqualityComparatorCreator,
|
|
255
|
-
InternalEqualityComparator,
|
|
256
|
-
PrimitiveWrapper,
|
|
257
|
-
State,
|
|
258
|
-
TypeEqualityComparator,
|
|
259
|
-
TypedArray,
|
|
260
|
-
};
|
|
210
|
+
export { circularDeepEqual, circularShallowEqual, createCustomEqual, deepEqual, sameValueZeroEqual, shallowEqual, strictCircularDeepEqual, strictCircularShallowEqual, strictDeepEqual, strictShallowEqual };
|
|
211
|
+
export type { AnyEqualityComparator, Cache, CircularState, ComparatorConfig, CreateCustomComparatorConfig, CreateState, CustomEqualCreatorOptions, DefaultState, Dictionary, EqualityComparator, EqualityComparatorCreator, InternalEqualityComparator, PrimitiveWrapper, State, TypeEqualityComparator, TypedArray };
|
package/package.json
CHANGED
|
@@ -1,45 +1,49 @@
|
|
|
1
1
|
{
|
|
2
|
-
"author":
|
|
3
|
-
|
|
2
|
+
"author": {
|
|
3
|
+
"email": "tony.quetano@planttheidea.com",
|
|
4
|
+
"name": "Tony Quetano",
|
|
5
|
+
"url": "https://www.planttheidea.com/"
|
|
6
|
+
},
|
|
7
|
+
"browser": "./dist/umd/index.js",
|
|
4
8
|
"bugs": {
|
|
5
9
|
"url": "https://github.com/planttheidea/fast-equals/issues"
|
|
6
10
|
},
|
|
7
11
|
"description": "A blazing fast equality comparison, either shallow or deep",
|
|
8
12
|
"devDependencies": {
|
|
9
|
-
"@planttheidea/build-tools": "^
|
|
10
|
-
"@types/lodash": "^4.17.
|
|
11
|
-
"@types/node": "^24.
|
|
13
|
+
"@planttheidea/build-tools": "^2.0.2",
|
|
14
|
+
"@types/lodash": "^4.17.24",
|
|
15
|
+
"@types/node": "^24.13.3",
|
|
12
16
|
"@types/ramda": "^0.31.1",
|
|
13
|
-
"@types/react": "^19.2.
|
|
17
|
+
"@types/react": "^19.2.17",
|
|
14
18
|
"@types/react-dom": "^19.2.3",
|
|
15
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
16
|
-
"@typescript-eslint/parser": "^8.
|
|
17
|
-
"@vitest/coverage-v8": "^4.
|
|
19
|
+
"@typescript-eslint/eslint-plugin": "^8.63.0",
|
|
20
|
+
"@typescript-eslint/parser": "^8.63.0",
|
|
21
|
+
"@vitest/coverage-v8": "^4.1.10",
|
|
18
22
|
"cli-table3": "^0.6.5",
|
|
19
23
|
"decircularize": "^1.0.0",
|
|
20
24
|
"deep-eql": "^5.0.2",
|
|
21
25
|
"deep-equal": "^2.2.3",
|
|
22
26
|
"dequal": "^2.0.3",
|
|
23
|
-
"eslint": "^9.39.
|
|
27
|
+
"eslint": "^9.39.4",
|
|
24
28
|
"eslint-friendly-formatter": "^4.0.1",
|
|
25
29
|
"eslint-plugin-import": "^2.32.0",
|
|
26
30
|
"fast-deep-equal": "^3.1.3",
|
|
27
31
|
"fast-glob": "^3.3.3",
|
|
28
|
-
"lodash": "^4.
|
|
32
|
+
"lodash": "^4.18.1",
|
|
29
33
|
"nano-equal": "^2.0.2",
|
|
30
|
-
"prettier": "^3.
|
|
31
|
-
"react": "^19.2.
|
|
32
|
-
"react-dom": "^19.2.
|
|
34
|
+
"prettier": "^3.9.4",
|
|
35
|
+
"react": "^19.2.7",
|
|
36
|
+
"react-dom": "^19.2.7",
|
|
33
37
|
"react-fast-compare": "^3.2.2",
|
|
34
|
-
"release-it": "^
|
|
35
|
-
"rollup": "^4.
|
|
38
|
+
"release-it": "^20.2.1",
|
|
39
|
+
"rollup": "^4.62.2",
|
|
36
40
|
"shallow-equal-fuzzy": "^0.0.2",
|
|
37
|
-
"tinybench": "^6.0.
|
|
41
|
+
"tinybench": "^6.0.2",
|
|
38
42
|
"typescript": "^5.9.3",
|
|
39
|
-
"typescript-eslint": "^8.
|
|
40
|
-
"underscore": "^1.13.
|
|
41
|
-
"vite": "^
|
|
42
|
-
"vitest": "^4.
|
|
43
|
+
"typescript-eslint": "^8.63.0",
|
|
44
|
+
"underscore": "^1.13.8",
|
|
45
|
+
"vite": "^8.1.4",
|
|
46
|
+
"vitest": "^4.1.10"
|
|
43
47
|
},
|
|
44
48
|
"engines": {
|
|
45
49
|
"node": ">=6.0.0"
|
|
@@ -76,16 +80,19 @@
|
|
|
76
80
|
"equivalent"
|
|
77
81
|
],
|
|
78
82
|
"license": "MIT",
|
|
79
|
-
"main": "dist/cjs/index.cjs",
|
|
80
|
-
"module": "dist/es/index.mjs",
|
|
83
|
+
"main": "./dist/cjs/index.cjs",
|
|
84
|
+
"module": "./dist/es/index.mjs",
|
|
81
85
|
"name": "fast-equals",
|
|
86
|
+
"publishConfig": {
|
|
87
|
+
"access": "public"
|
|
88
|
+
},
|
|
82
89
|
"repository": {
|
|
83
90
|
"type": "git",
|
|
84
91
|
"url": "git+https://github.com/planttheidea/fast-equals.git"
|
|
85
92
|
},
|
|
86
93
|
"scripts": {
|
|
87
94
|
"benchmark": "npm run build && node benchmark/index.js",
|
|
88
|
-
"build": "npm run clean && npm run build:dist
|
|
95
|
+
"build": "npm run clean && npm run build:dist",
|
|
89
96
|
"build:dist": "NODE_ENV=production rollup -c config/rollup.config.js",
|
|
90
97
|
"build:types": "pti fix-types -l dist",
|
|
91
98
|
"clean": "rm -rf dist",
|
|
@@ -109,5 +116,5 @@
|
|
|
109
116
|
"sideEffects": false,
|
|
110
117
|
"type": "module",
|
|
111
118
|
"types": "./index.d.ts",
|
|
112
|
-
"version": "5.4.
|
|
119
|
+
"version": "5.4.1"
|
|
113
120
|
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
ComparatorConfig,
|
|
3
|
-
CreateState,
|
|
4
|
-
CustomEqualCreatorOptions,
|
|
5
|
-
EqualityComparator,
|
|
6
|
-
InternalEqualityComparator,
|
|
7
|
-
} from './internalTypes.d.cts';
|
|
8
|
-
interface CreateIsEqualOptions<Meta> {
|
|
9
|
-
circular: boolean;
|
|
10
|
-
comparator: EqualityComparator<Meta>;
|
|
11
|
-
createState: CreateState<Meta> | undefined;
|
|
12
|
-
equals: InternalEqualityComparator<Meta>;
|
|
13
|
-
strict: boolean;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Create a comparator method based on the type-specific equality comparators passed.
|
|
17
|
-
*/
|
|
18
|
-
export declare function createEqualityComparator<Meta>({
|
|
19
|
-
areArrayBuffersEqual,
|
|
20
|
-
areArraysEqual,
|
|
21
|
-
areDataViewsEqual,
|
|
22
|
-
areDatesEqual,
|
|
23
|
-
areErrorsEqual,
|
|
24
|
-
areFunctionsEqual,
|
|
25
|
-
areMapsEqual,
|
|
26
|
-
areNumbersEqual,
|
|
27
|
-
areObjectsEqual,
|
|
28
|
-
arePrimitiveWrappersEqual,
|
|
29
|
-
areRegExpsEqual,
|
|
30
|
-
areSetsEqual,
|
|
31
|
-
areTypedArraysEqual,
|
|
32
|
-
areUrlsEqual,
|
|
33
|
-
unknownTagComparators,
|
|
34
|
-
}: ComparatorConfig<Meta>): EqualityComparator<Meta>;
|
|
35
|
-
/**
|
|
36
|
-
* Create the configuration object used for building comparators.
|
|
37
|
-
*/
|
|
38
|
-
export declare function createEqualityComparatorConfig<Meta>({
|
|
39
|
-
circular,
|
|
40
|
-
createCustomConfig,
|
|
41
|
-
strict,
|
|
42
|
-
}: CustomEqualCreatorOptions<Meta>): ComparatorConfig<Meta>;
|
|
43
|
-
/**
|
|
44
|
-
* Default equality comparator pass-through, used as the standard `isEqual` creator for
|
|
45
|
-
* use inside the built comparator.
|
|
46
|
-
*/
|
|
47
|
-
export declare function createInternalEqualityComparator<Meta>(
|
|
48
|
-
compare: EqualityComparator<Meta>,
|
|
49
|
-
): InternalEqualityComparator<Meta>;
|
|
50
|
-
/**
|
|
51
|
-
* Create the `isEqual` function used by the consuming application.
|
|
52
|
-
*/
|
|
53
|
-
export declare function createIsEqual<Meta>({
|
|
54
|
-
circular,
|
|
55
|
-
comparator,
|
|
56
|
-
createState,
|
|
57
|
-
equals,
|
|
58
|
-
strict,
|
|
59
|
-
}: CreateIsEqualOptions<Meta>): <A, B>(a: A, b: B) => boolean;
|
|
60
|
-
export {};
|
package/dist/cjs/equals.d.cts
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import type { Dictionary, PrimitiveWrapper, State, TypedArray } from './internalTypes.d.cts';
|
|
2
|
-
import type { sameValueZeroEqual } from './utils.d.cts';
|
|
3
|
-
/**
|
|
4
|
-
* Whether the array buffers are equal in value.
|
|
5
|
-
*/
|
|
6
|
-
export declare function areArrayBuffersEqual(a: ArrayBuffer, b: ArrayBuffer): boolean;
|
|
7
|
-
/**
|
|
8
|
-
* Whether the arrays are equal in value.
|
|
9
|
-
*/
|
|
10
|
-
export declare function areArraysEqual(a: any[], b: any[], state: State<any>): boolean;
|
|
11
|
-
/**
|
|
12
|
-
* Whether the dataviews are equal in value.
|
|
13
|
-
*/
|
|
14
|
-
export declare function areDataViewsEqual(a: DataView, b: DataView): boolean;
|
|
15
|
-
/**
|
|
16
|
-
* Whether the dates passed are equal in value.
|
|
17
|
-
*/
|
|
18
|
-
export declare function areDatesEqual(a: Date, b: Date): boolean;
|
|
19
|
-
/**
|
|
20
|
-
* Whether the errors passed are equal in value.
|
|
21
|
-
*/
|
|
22
|
-
export declare function areErrorsEqual(a: Error, b: Error): boolean;
|
|
23
|
-
/**
|
|
24
|
-
* Whether the functions passed are equal in value.
|
|
25
|
-
*/
|
|
26
|
-
export declare function areFunctionsEqual(a: (...args: any[]) => any, b: (...args: any[]) => any): boolean;
|
|
27
|
-
/**
|
|
28
|
-
* Whether the `Map`s are equal in value.
|
|
29
|
-
*/
|
|
30
|
-
export declare function areMapsEqual(a: Map<any, any>, b: Map<any, any>, state: State<any>): boolean;
|
|
31
|
-
/**
|
|
32
|
-
* Whether the numbers are equal in value.
|
|
33
|
-
*/
|
|
34
|
-
export declare const areNumbersEqual: typeof sameValueZeroEqual;
|
|
35
|
-
/**
|
|
36
|
-
* Whether the objects are equal in value.
|
|
37
|
-
*/
|
|
38
|
-
export declare function areObjectsEqual(a: Dictionary, b: Dictionary, state: State<any>): boolean;
|
|
39
|
-
/**
|
|
40
|
-
* Whether the objects are equal in value with strict property checking.
|
|
41
|
-
*/
|
|
42
|
-
export declare function areObjectsEqualStrict(a: Dictionary, b: Dictionary, state: State<any>): boolean;
|
|
43
|
-
/**
|
|
44
|
-
* Whether the primitive wrappers passed are equal in value.
|
|
45
|
-
*/
|
|
46
|
-
export declare function arePrimitiveWrappersEqual(a: PrimitiveWrapper, b: PrimitiveWrapper): boolean;
|
|
47
|
-
/**
|
|
48
|
-
* Whether the regexps passed are equal in value.
|
|
49
|
-
*/
|
|
50
|
-
export declare function areRegExpsEqual(a: RegExp, b: RegExp): boolean;
|
|
51
|
-
/**
|
|
52
|
-
* Whether the `Set`s are equal in value.
|
|
53
|
-
*/
|
|
54
|
-
export declare function areSetsEqual(a: Set<any>, b: Set<any>, state: State<any>): boolean;
|
|
55
|
-
/**
|
|
56
|
-
* Whether the TypedArray instances are equal in value.
|
|
57
|
-
*/
|
|
58
|
-
export declare function areTypedArraysEqual(a: TypedArray, b: TypedArray): boolean;
|
|
59
|
-
/**
|
|
60
|
-
* Whether the URL instances are equal in value.
|
|
61
|
-
*/
|
|
62
|
-
export declare function areUrlsEqual(a: URL, b: URL): boolean;
|