@xylabs/array 4.13.4 → 4.13.6
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/neutral/index.d.ts +23 -25
- package/package.json +5 -5
package/dist/neutral/index.d.ts
CHANGED
|
@@ -1,25 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Returns the elements of an array that meet the condition specified in a callback function.
|
|
9
|
-
* @param array The array to filter.
|
|
10
|
-
* @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array.
|
|
11
|
-
* @returns The elements of an array that meet the condition specified in a callback function.
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
export
|
|
24
|
-
|
|
25
|
-
export { }
|
|
1
|
+
declare const containsAll: <T>(source: T[], target: T[]) => boolean;
|
|
2
|
+
|
|
3
|
+
declare const distinct: <T>(value: T, index: number, array: T[]) => boolean;
|
|
4
|
+
|
|
5
|
+
declare const filterAs: <In, Out>(x: In[], predicate: (a: In) => Out) => NonNullable<Out>[];
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Returns the elements of an array that meet the condition specified in a callback function.
|
|
9
|
+
* @param array The array to filter.
|
|
10
|
+
* @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array.
|
|
11
|
+
* @returns The elements of an array that meet the condition specified in a callback function.
|
|
12
|
+
*/
|
|
13
|
+
declare const filterAsync: <T>(array: T[], predicate: (value: T, index: number, array: T[]) => Promise<boolean>) => Promise<T[]>;
|
|
14
|
+
|
|
15
|
+
declare const findAs: <In, Out>(x: In[], predicate: (a: In) => Out) => NonNullable<Out> | undefined;
|
|
16
|
+
declare const findLastAs: <In, Out>(x: In[], predicate: (a: In) => Out) => NonNullable<Out> | undefined;
|
|
17
|
+
|
|
18
|
+
declare const flatten: <T>(a?: T | ConcatArray<T>, b?: T | ConcatArray<T>) => T[];
|
|
19
|
+
|
|
20
|
+
declare const uniq: <T>(arr: T[]) => T[];
|
|
21
|
+
declare const uniqBy: <T, I>(arr: T[], iteratee: (item: T) => I) => T[];
|
|
22
|
+
|
|
23
|
+
export { containsAll, distinct, filterAs, filterAsync, findAs, findLastAs, flatten, uniq, uniqBy };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xylabs/array",
|
|
3
|
-
"version": "4.13.
|
|
3
|
+
"version": "4.13.6",
|
|
4
4
|
"description": "Base functionality used throughout XY Labs TypeScript/JavaScript libraries",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"xylabs",
|
|
@@ -35,12 +35,12 @@
|
|
|
35
35
|
"module": "./dist/neutral/index.mjs",
|
|
36
36
|
"types": "./dist/neutral/index.d.ts",
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@xylabs/exists": "^4.13.
|
|
38
|
+
"@xylabs/exists": "^4.13.6"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@xylabs/ts-scripts-yarn3": "^7.0.0-rc.
|
|
42
|
-
"@xylabs/tsconfig": "^7.0.0-rc.
|
|
43
|
-
"@xylabs/vitest-extended": "^4.13.
|
|
41
|
+
"@xylabs/ts-scripts-yarn3": "^7.0.0-rc.8",
|
|
42
|
+
"@xylabs/tsconfig": "^7.0.0-rc.8",
|
|
43
|
+
"@xylabs/vitest-extended": "^4.13.6",
|
|
44
44
|
"typescript": "^5.8.3",
|
|
45
45
|
"vitest": "^3.2.4"
|
|
46
46
|
},
|