@squiz/optimization-utils 3.2.0 → 3.2.2
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/array/unique.d.ts +1 -1
- package/dist/array/unique.js +3 -3
- package/dist/array/unique.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/measurement/performance.js +1 -2
- package/dist/measurement/performance.js.map +1 -1
- package/package.json +1 -1
package/dist/array/unique.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const uniqueWith: <T>(arr: Array<T>, fn: (a: T, b: T) => boolean) => Array<T>;
|
|
2
2
|
export declare const uniq: <T>(arr: Array<T>) => Array<T>;
|
package/dist/array/unique.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.uniq = exports.
|
|
4
|
-
const
|
|
5
|
-
exports.
|
|
3
|
+
exports.uniq = exports.uniqueWith = void 0;
|
|
4
|
+
const uniqueWith = (arr, fn) => arr.filter((element, index) => arr.findIndex((step) => fn(element, step)) === index);
|
|
5
|
+
exports.uniqueWith = uniqueWith;
|
|
6
6
|
const uniq = (arr) => [...new Set(arr)];
|
|
7
7
|
exports.uniq = uniq;
|
|
8
8
|
//# sourceMappingURL=unique.js.map
|
package/dist/array/unique.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unique.js","sourceRoot":"","sources":["../../src/array/unique.ts"],"names":[],"mappings":";;;AAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"unique.js","sourceRoot":"","sources":["../../src/array/unique.ts"],"names":[],"mappings":";;;AAAO,MAAM,UAAU,GAAG,CACxB,GAAa,EACb,EAA2B,EACjB,EAAE,CACZ,GAAG,CAAC,MAAM,CACR,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,EAAE,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,KAAK,KAAK,CACzE,CAAC;AANS,QAAA,UAAU,cAMnB;AAEG,MAAM,IAAI,GAAG,CAAI,GAAa,EAAY,EAAE,CAAC,CAAC,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;AAAzD,QAAA,IAAI,QAAqD"}
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./types/class-utilities-types"), exports);
|
|
18
18
|
__exportStar(require("./object/getProperty"), exports);
|
|
19
|
+
__exportStar(require("./measurement/performance"), exports);
|
|
19
20
|
__exportStar(require("./data-structures/Result"), exports);
|
|
20
21
|
__exportStar(require("./array/chunkify"), exports);
|
|
21
22
|
__exportStar(require("./array/unique"), exports);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gEAA8C;AAC9C,uDAAqC;AACrC,2DAAyC;AACzC,mDAAiC;AACjC,iDAA+B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gEAA8C;AAC9C,uDAAqC;AACrC,4DAA0C;AAC1C,2DAAyC;AACzC,mDAAiC;AACjC,iDAA+B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"performance.js","sourceRoot":"","sources":["../../src/measurement/performance.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBA,
|
|
1
|
+
{"version":3,"file":"performance.js","sourceRoot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