@xylabs/array 2.12.13 → 2.12.15

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.
@@ -1,4 +1,5 @@
1
- const containsAll = (source, target) => target.every((i) => source.includes(i));
1
+ // src/containsAll.ts
2
+ var containsAll = (source, target) => target.every((i) => source.includes(i));
2
3
  export {
3
4
  containsAll
4
5
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/containsAll.ts"],"sourcesContent":["export const containsAll = <T>(source: T[], target: T[]) => target.every((i) => source.includes(i))\n"],"mappings":"AAAO,MAAM,cAAc,CAAI,QAAa,WAAgB,OAAO,MAAM,CAAC,MAAM,OAAO,SAAS,CAAC,CAAC;","names":[]}
1
+ {"version":3,"sources":["../../src/containsAll.ts"],"sourcesContent":["export const containsAll = <T>(source: T[], target: T[]) => target.every((i) => source.includes(i))\n"],"mappings":";AAAO,IAAM,cAAc,CAAI,QAAa,WAAgB,OAAO,MAAM,CAAC,MAAM,OAAO,SAAS,CAAC,CAAC;","names":[]}
@@ -1,4 +1,5 @@
1
- const distinct = (value, index, array) => array.indexOf(value) === index;
1
+ // src/distinct.ts
2
+ var distinct = (value, index, array) => array.indexOf(value) === index;
2
3
  export {
3
4
  distinct
4
5
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/distinct.ts"],"sourcesContent":["export const distinct = <T>(value: T, index: number, array: T[]) => array.indexOf(value) === index\n"],"mappings":"AAAO,MAAM,WAAW,CAAI,OAAU,OAAe,UAAe,MAAM,QAAQ,KAAK,MAAM;","names":[]}
1
+ {"version":3,"sources":["../../src/distinct.ts"],"sourcesContent":["export const distinct = <T>(value: T, index: number, array: T[]) => array.indexOf(value) === index\n"],"mappings":";AAAO,IAAM,WAAW,CAAI,OAAU,OAAe,UAAe,MAAM,QAAQ,KAAK,MAAM;","names":[]}
@@ -1,5 +1,6 @@
1
+ // src/flatten.ts
1
2
  import { exists } from "@xylabs/exists";
2
- const flatten = (a, b) => {
3
+ var flatten = (a, b) => {
3
4
  return [].concat(a).concat(b).filter(exists);
4
5
  };
5
6
  export {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/flatten.ts"],"sourcesContent":["import { exists } from '@xylabs/exists'\n\nexport const flatten = <T>(a?: T | ConcatArray<T>, b?: T | ConcatArray<T>): T[] => {\n return ([] as (T | undefined)[]).concat(a).concat(b).filter(exists)\n}\n"],"mappings":"AAAA,SAAS,cAAc;AAEhB,MAAM,UAAU,CAAI,GAAwB,MAAgC;AACjF,SAAQ,CAAC,EAAwB,OAAO,CAAC,EAAE,OAAO,CAAC,EAAE,OAAO,MAAM;AACpE;","names":[]}
1
+ {"version":3,"sources":["../../src/flatten.ts"],"sourcesContent":["import { exists } from '@xylabs/exists'\n\nexport const flatten = <T>(a?: T | ConcatArray<T>, b?: T | ConcatArray<T>): T[] => {\n return ([] as (T | undefined)[]).concat(a).concat(b).filter(exists)\n}\n"],"mappings":";AAAA,SAAS,cAAc;AAEhB,IAAM,UAAU,CAAI,GAAwB,MAAgC;AACjF,SAAQ,CAAC,EAAwB,OAAO,CAAC,EAAE,OAAO,CAAC,EAAE,OAAO,MAAM;AACpE;","names":[]}
@@ -1,4 +1,17 @@
1
- export * from "./containsAll";
2
- export * from "./distinct";
3
- export * from "./flatten";
1
+ // src/containsAll.ts
2
+ var containsAll = (source, target) => target.every((i) => source.includes(i));
3
+
4
+ // src/distinct.ts
5
+ var distinct = (value, index, array) => array.indexOf(value) === index;
6
+
7
+ // src/flatten.ts
8
+ import { exists } from "@xylabs/exists";
9
+ var flatten = (a, b) => {
10
+ return [].concat(a).concat(b).filter(exists);
11
+ };
12
+ export {
13
+ containsAll,
14
+ distinct,
15
+ flatten
16
+ };
4
17
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export * from './containsAll'\nexport * from './distinct'\nexport * from './flatten'\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
1
+ {"version":3,"sources":["../../src/containsAll.ts","../../src/distinct.ts","../../src/flatten.ts"],"sourcesContent":["export const containsAll = <T>(source: T[], target: T[]) => target.every((i) => source.includes(i))\n","export const distinct = <T>(value: T, index: number, array: T[]) => array.indexOf(value) === index\n","import { exists } from '@xylabs/exists'\n\nexport const flatten = <T>(a?: T | ConcatArray<T>, b?: T | ConcatArray<T>): T[] => {\n return ([] as (T | undefined)[]).concat(a).concat(b).filter(exists)\n}\n"],"mappings":";AAAO,IAAM,cAAc,CAAI,QAAa,WAAgB,OAAO,MAAM,CAAC,MAAM,OAAO,SAAS,CAAC,CAAC;;;ACA3F,IAAM,WAAW,CAAI,OAAU,OAAe,UAAe,MAAM,QAAQ,KAAK,MAAM;;;ACA7F,SAAS,cAAc;AAEhB,IAAM,UAAU,CAAI,GAAwB,MAAgC;AACjF,SAAQ,CAAC,EAAwB,OAAO,CAAC,EAAE,OAAO,CAAC,EAAE,OAAO,MAAM;AACpE;","names":[]}
package/package.json CHANGED
@@ -32,11 +32,11 @@
32
32
  "types": "./dist/node/index.d.ts",
33
33
  "module": "./dist/node/index.js",
34
34
  "dependencies": {
35
- "@xylabs/exists": "~2.12.13"
35
+ "@xylabs/exists": "~2.12.15"
36
36
  },
37
37
  "devDependencies": {
38
- "@xylabs/ts-scripts-yarn3": "^3.0.78",
39
- "@xylabs/tsconfig": "^3.0.78",
38
+ "@xylabs/ts-scripts-yarn3": "^3.0.88",
39
+ "@xylabs/tsconfig": "^3.0.88",
40
40
  "typescript": "^5.2.2"
41
41
  },
42
42
  "homepage": "https://xylabs.com",
@@ -54,6 +54,6 @@
54
54
  "url": "https://github.com/xylabs/sdk-js.git"
55
55
  },
56
56
  "sideEffects": false,
57
- "version": "2.12.13",
57
+ "version": "2.12.15",
58
58
  "type": "module"
59
59
  }