@xylabs/array 4.13.14 β 4.13.16
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 +22 -31
- package/dist/neutral/containsAll.d.ts +2 -0
- package/dist/neutral/containsAll.d.ts.map +1 -0
- package/dist/neutral/distinct.d.ts +2 -0
- package/dist/neutral/distinct.d.ts.map +1 -0
- package/dist/neutral/filterAs.d.ts +2 -0
- package/dist/neutral/filterAs.d.ts.map +1 -0
- package/dist/neutral/filterAsync.d.ts +8 -0
- package/dist/neutral/filterAsync.d.ts.map +1 -0
- package/dist/neutral/findAs.d.ts +3 -0
- package/dist/neutral/findAs.d.ts.map +1 -0
- package/dist/neutral/flatten.d.ts +2 -0
- package/dist/neutral/flatten.d.ts.map +1 -0
- package/dist/neutral/index.d.ts +8 -23
- package/dist/neutral/index.d.ts.map +1 -0
- package/dist/neutral/spec/containsAll.spec.d.ts +2 -0
- package/dist/neutral/spec/containsAll.spec.d.ts.map +1 -0
- package/dist/neutral/spec/distinct.spec.d.ts +2 -0
- package/dist/neutral/spec/distinct.spec.d.ts.map +1 -0
- package/dist/neutral/spec/filterAsync.spec.d.ts +2 -0
- package/dist/neutral/spec/filterAsync.spec.d.ts.map +1 -0
- package/dist/neutral/spec/flatten.spec.d.ts +2 -0
- package/dist/neutral/spec/flatten.spec.d.ts.map +1 -0
- package/dist/neutral/uniq.d.ts +3 -0
- package/dist/neutral/uniq.d.ts.map +1 -0
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -1,63 +1,54 @@
|
|
|
1
|
-
[![logo][]](https://xylabs.com)
|
|
2
|
-
|
|
3
1
|
# @xylabs/array
|
|
4
2
|
|
|
3
|
+
[![logo][]](https://xylabs.com)
|
|
4
|
+
|
|
5
|
+
[![main-build][]][main-build-link]
|
|
5
6
|
[![npm-badge][]][npm-link]
|
|
6
7
|
[![npm-downloads-badge][]][npm-link]
|
|
7
8
|
[![jsdelivr-badge][]][jsdelivr-link]
|
|
8
9
|
[![npm-license-badge][]](LICENSE)
|
|
10
|
+
[![codacy-badge][]][codacy-link]
|
|
11
|
+
[![codeclimate-badge][]][codeclimate-link]
|
|
12
|
+
[![snyk-badge][]][snyk-link]
|
|
9
13
|
[![socket-badge][]][socket-link]
|
|
10
14
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
## Table of Contents
|
|
14
|
-
|
|
15
|
-
- [Description](#description)
|
|
16
|
-
- [Install](#install)
|
|
17
|
-
- [Maintainers](#maintainers)
|
|
18
|
-
- [License](#license)
|
|
19
|
-
- [Credits](#credits)
|
|
20
|
-
|
|
21
|
-
## Description
|
|
15
|
+
Version: 4.13.15
|
|
22
16
|
|
|
23
|
-
|
|
17
|
+
Base functionality used throughout XY Labs TypeScript/JavaScript libraries
|
|
24
18
|
|
|
25
|
-
##
|
|
26
|
-
|
|
27
|
-
Using npm:
|
|
28
|
-
|
|
29
|
-
```sh
|
|
30
|
-
npm i --save @xylabs/array
|
|
31
|
-
```
|
|
19
|
+
## Documentation
|
|
32
20
|
|
|
33
|
-
|
|
21
|
+
Coming Soon!
|
|
34
22
|
|
|
35
|
-
|
|
36
|
-
yarn add @xylabs/array
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
## Documentation
|
|
40
|
-
[Developer Reference](https://xylabs.github.io/sdk-js)
|
|
23
|
+
Part of [sdk-js](https://www.npmjs.com/package/@xyo-network/sdk-js)
|
|
41
24
|
|
|
42
25
|
## Maintainers
|
|
43
26
|
|
|
44
27
|
- [Arie Trouw](https://github.com/arietrouw) ([arietrouw.com](https://arietrouw.com))
|
|
45
|
-
- [Joel Carter](https://github.com/JoelBCarter)
|
|
46
28
|
- [Matt Jones](https://github.com/jonesmac)
|
|
29
|
+
- [Joel Carter](https://github.com/JoelBCarter)
|
|
47
30
|
- [Jordan Trouw](https://github.com/jordantrouw)
|
|
48
31
|
|
|
49
32
|
## License
|
|
50
33
|
|
|
51
|
-
See the [LICENSE](LICENSE) file for license details
|
|
34
|
+
> See the [LICENSE](LICENSE) file for license details
|
|
52
35
|
|
|
53
36
|
## Credits
|
|
54
37
|
|
|
55
|
-
[Made with π₯and βοΈ by
|
|
38
|
+
[Made with π₯ and βοΈ by XYLabs](https://xylabs.com)
|
|
56
39
|
|
|
57
40
|
[logo]: https://cdn.xy.company/img/brand/XYPersistentCompany_Logo_Icon_Colored.svg
|
|
58
41
|
|
|
42
|
+
[main-build]: https://github.com/xylabs/sdk-js/actions/workflows/build.yml/badge.svg
|
|
43
|
+
[main-build-link]: https://github.com/xylabs/sdk-js/actions/workflows/build.yml
|
|
59
44
|
[npm-badge]: https://img.shields.io/npm/v/@xylabs/array.svg
|
|
60
45
|
[npm-link]: https://www.npmjs.com/package/@xylabs/array
|
|
46
|
+
[codacy-badge]: https://app.codacy.com/project/badge/Grade/c8e15e14f37741c18cfb47ac7245c698
|
|
47
|
+
[codacy-link]: https://www.codacy.com/gh/xylabs/sdk-js/dashboard?utm_source=github.com&utm_medium=referral&utm_content=xylabs/sdk-js&utm_campaign=Badge_Grade
|
|
48
|
+
[codeclimate-badge]: https://api.codeclimate.com/v1/badges/c5eb068f806f0b047ea7/maintainability
|
|
49
|
+
[codeclimate-link]: https://codeclimate.com/github/xylabs/sdk-js/maintainability
|
|
50
|
+
[snyk-badge]: https://snyk.io/test/github/xylabs/sdk-js/badge.svg?targetFile=package.json
|
|
51
|
+
[snyk-link]: https://snyk.io/test/github/xylabs/sdk-js?targetFile=package.json
|
|
61
52
|
|
|
62
53
|
[npm-downloads-badge]: https://img.shields.io/npm/dw/@xylabs/array
|
|
63
54
|
[npm-license-badge]: https://img.shields.io/npm/l/@xylabs/array
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"containsAll.d.ts","sourceRoot":"","sources":["../../src/containsAll.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,GAAI,CAAC,EAAE,QAAQ,CAAC,EAAE,EAAE,QAAQ,CAAC,EAAE,YAA0C,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"distinct.d.ts","sourceRoot":"","sources":["../../src/distinct.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,GAAI,CAAC,EAAE,OAAO,CAAC,EAAE,OAAO,MAAM,EAAE,OAAO,CAAC,EAAE,KAAG,OASjE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filterAs.d.ts","sourceRoot":"","sources":["../../src/filterAs.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,QAAQ,GAAI,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,WAAW,CAAC,CAAC,EAAE,EAAE,KAAK,GAAG,uBAEnE,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns the elements of an array that meet the condition specified in a callback function.
|
|
3
|
+
* @param array The array to filter.
|
|
4
|
+
* @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.
|
|
5
|
+
* @returns The elements of an array that meet the condition specified in a callback function.
|
|
6
|
+
*/
|
|
7
|
+
export declare const filterAsync: <T>(array: T[], predicate: (value: T, index: number, array: T[]) => Promise<boolean>) => Promise<T[]>;
|
|
8
|
+
//# sourceMappingURL=filterAsync.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filterAsync.d.ts","sourceRoot":"","sources":["../../src/filterAsync.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,WAAW,GAAU,CAAC,EACjC,OAAO,CAAC,EAAE,EACV,WAAW,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,OAAO,CAAC,OAAO,CAAC,KACnE,OAAO,CAAC,CAAC,EAAE,CAGb,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"findAs.d.ts","sourceRoot":"","sources":["../../src/findAs.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,GAAI,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,WAAW,CAAC,CAAC,EAAE,EAAE,KAAK,GAAG,iCAEjE,CAAA;AAED,eAAO,MAAM,UAAU,GAAI,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,WAAW,CAAC,CAAC,EAAE,EAAE,KAAK,GAAG,iCAErE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flatten.d.ts","sourceRoot":"","sources":["../../src/flatten.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,GAAI,CAAC,EAAE,IAAI,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,KAAG,CAAC,EAG5E,CAAA"}
|
package/dist/neutral/index.d.ts
CHANGED
|
@@ -1,23 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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 };
|
|
1
|
+
export * from './containsAll.ts';
|
|
2
|
+
export * from './distinct.ts';
|
|
3
|
+
export * from './filterAs.ts';
|
|
4
|
+
export * from './filterAsync.ts';
|
|
5
|
+
export * from './findAs.ts';
|
|
6
|
+
export * from './flatten.ts';
|
|
7
|
+
export * from './uniq.ts';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA;AAC7B,cAAc,kBAAkB,CAAA;AAChC,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA;AAC5B,cAAc,WAAW,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"containsAll.spec.d.ts","sourceRoot":"","sources":["../../../src/spec/containsAll.spec.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"distinct.spec.d.ts","sourceRoot":"","sources":["../../../src/spec/distinct.spec.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filterAsync.spec.d.ts","sourceRoot":"","sources":["../../../src/spec/filterAsync.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flatten.spec.d.ts","sourceRoot":"","sources":["../../../src/spec/flatten.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uniq.d.ts","sourceRoot":"","sources":["../../src/uniq.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI,GAAI,CAAC,EAAE,KAAK,CAAC,EAAE,KAAG,CAAC,EAEnC,CAAA;AAED,eAAO,MAAM,MAAM,GAAI,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,UAAU,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,KAAG,CAAC,EAUlE,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xylabs/array",
|
|
3
|
-
"version": "4.13.
|
|
3
|
+
"version": "4.13.16",
|
|
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.16"
|
|
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.27",
|
|
42
|
+
"@xylabs/tsconfig": "^7.0.0-rc.27",
|
|
43
|
+
"@xylabs/vitest-extended": "^4.13.16",
|
|
44
44
|
"typescript": "^5.8.3",
|
|
45
45
|
"vitest": "^3.2.4"
|
|
46
46
|
},
|