@jest/expect-utils
Advanced tools
+16
-13
@@ -13,4 +13,4 @@ /*! | ||
| /***/ "./src/immutableUtils.ts": | ||
| /***/ ((__unused_webpack_module, exports) => { | ||
| /***/ "./src/immutableUtils.ts" | ||
| (__unused_webpack_module, exports) { | ||
@@ -64,6 +64,6 @@ | ||
| /***/ }), | ||
| /***/ }, | ||
| /***/ "./src/index.ts": | ||
| /***/ ((__unused_webpack_module, exports, __webpack_require__) => { | ||
| /***/ "./src/index.ts" | ||
| (__unused_webpack_module, exports, __webpack_require__) { | ||
@@ -105,6 +105,6 @@ | ||
| /***/ }), | ||
| /***/ }, | ||
| /***/ "./src/jasmineUtils.ts": | ||
| /***/ ((__unused_webpack_module, exports) => { | ||
| /***/ "./src/jasmineUtils.ts" | ||
| (__unused_webpack_module, exports) { | ||
@@ -311,6 +311,6 @@ | ||
| /***/ }), | ||
| /***/ }, | ||
| /***/ "./src/utils.ts": | ||
| /***/ ((__unused_webpack_module, exports, __webpack_require__) => { | ||
| /***/ "./src/utils.ts" | ||
| (__unused_webpack_module, exports, __webpack_require__) { | ||
@@ -417,3 +417,6 @@ | ||
| seenReferences.set(object, trimmed); | ||
| for (const key of getObjectKeys(object).filter(key => hasPropertyInObject(subset, key))) { | ||
| for (const key of getObjectKeys(object)) { | ||
| if (!hasPropertyInObject(subset, key)) { | ||
| continue; | ||
| } | ||
| trimmed[key] = seenReferences.has(object[key]) ? seenReferences.get(object[key]) : getObjectSubset(object[key], subset[key], customTesters, seenReferences); | ||
@@ -675,3 +678,3 @@ } | ||
| /***/ }) | ||
| /***/ } | ||
@@ -678,0 +681,0 @@ /******/ }); |
+3
-3
| { | ||
| "name": "@jest/expect-utils", | ||
| "version": "30.2.0", | ||
| "version": "30.3.0", | ||
| "repository": { | ||
@@ -26,3 +26,3 @@ "type": "git", | ||
| "immutable": "^5.1.2", | ||
| "jest-matcher-utils": "30.2.0" | ||
| "jest-matcher-utils": "30.3.0" | ||
| }, | ||
@@ -35,3 +35,3 @@ "engines": { | ||
| }, | ||
| "gitHead": "855864e3f9751366455246790be2bf912d4d0dac" | ||
| "gitHead": "efb59c2e81083f8dc941f20d6d20a3af2dc8d068" | ||
| } |
| //#region src/types.d.ts | ||
| type Tester = (this: TesterContext, a: any, b: any, customTesters: Array<Tester>) => boolean | undefined; | ||
| interface TesterContext { | ||
| equals: EqualsFunction; | ||
| } | ||
| //#endregion | ||
| //#region src/jasmineUtils.d.ts | ||
| type EqualsFunction = (a: unknown, b: unknown, customTesters?: Array<Tester>, strictCheck?: boolean) => boolean; | ||
| declare const equals: EqualsFunction; | ||
| declare function isA<T>(typeName: string, value: unknown): value is T; | ||
| //#endregion | ||
| //#region src/utils.d.ts | ||
| type GetPath = { | ||
| hasEndProp?: boolean; | ||
| endPropIsDefined?: boolean; | ||
| lastTraversedObject: unknown; | ||
| traversedPath: Array<string>; | ||
| value?: unknown; | ||
| }; | ||
| declare const getObjectKeys: (object: object) => Array<string | symbol>; | ||
| declare const getPath: (object: Record<string, any>, propertyPath: string | Array<string>) => GetPath; | ||
| declare const getObjectSubset: (object: any, subset: any, customTesters?: Array<Tester>, seenReferences?: WeakMap<object, boolean>) => any; | ||
| declare const iterableEquality: (a: any, b: any, customTesters?: Array<Tester>, aStack?: Array<any>, bStack?: Array<any>) => boolean | undefined; | ||
| declare const subsetEquality: (object: unknown, subset: unknown, customTesters?: Array<Tester>) => boolean | undefined; | ||
| declare const typeEquality: (a: any, b: any) => boolean | undefined; | ||
| declare const arrayBufferEquality: (a: unknown, b: unknown) => boolean | undefined; | ||
| declare const sparseArrayEquality: (a: unknown, b: unknown, customTesters?: Array<Tester>) => boolean | undefined; | ||
| declare const partition: <T>(items: Array<T>, predicate: (arg: T) => boolean) => [Array<T>, Array<T>]; | ||
| declare const pathAsArray: (propertyPath: string) => Array<any>; | ||
| declare const isError: (value: unknown) => value is Error; | ||
| declare function emptyObject(obj: unknown): boolean; | ||
| declare const isOneline: (expected: unknown, received: unknown) => boolean; | ||
| //#endregion | ||
| export { EqualsFunction, Tester, TesterContext, arrayBufferEquality, emptyObject, equals, getObjectKeys, getObjectSubset, getPath, isA, isError, isOneline, iterableEquality, partition, pathAsArray, sparseArrayEquality, subsetEquality, typeEquality }; |
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
754
0.4%31198
-6.42%6
-14.29%