@xylabs/array 3.6.12 → 4.0.1

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.
Files changed (84) hide show
  1. package/dist/neutral/index.d.ts +7 -4
  2. package/package.json +6 -13
  3. package/xy.config.ts +12 -0
  4. package/dist/browser/containsAll.d.cts +0 -2
  5. package/dist/browser/containsAll.d.cts.map +0 -1
  6. package/dist/browser/containsAll.d.mts +0 -2
  7. package/dist/browser/containsAll.d.mts.map +0 -1
  8. package/dist/browser/containsAll.d.ts +0 -2
  9. package/dist/browser/containsAll.d.ts.map +0 -1
  10. package/dist/browser/distinct.d.cts +0 -2
  11. package/dist/browser/distinct.d.cts.map +0 -1
  12. package/dist/browser/distinct.d.mts +0 -2
  13. package/dist/browser/distinct.d.mts.map +0 -1
  14. package/dist/browser/distinct.d.ts +0 -2
  15. package/dist/browser/distinct.d.ts.map +0 -1
  16. package/dist/browser/flatten.d.cts +0 -2
  17. package/dist/browser/flatten.d.cts.map +0 -1
  18. package/dist/browser/flatten.d.mts +0 -2
  19. package/dist/browser/flatten.d.mts.map +0 -1
  20. package/dist/browser/flatten.d.ts +0 -2
  21. package/dist/browser/flatten.d.ts.map +0 -1
  22. package/dist/browser/index.cjs +0 -40
  23. package/dist/browser/index.cjs.map +0 -1
  24. package/dist/browser/index.d.cts +0 -4
  25. package/dist/browser/index.d.cts.map +0 -1
  26. package/dist/browser/index.d.mts +0 -4
  27. package/dist/browser/index.d.mts.map +0 -1
  28. package/dist/browser/index.d.ts +0 -4
  29. package/dist/browser/index.d.ts.map +0 -1
  30. package/dist/browser/index.mjs +0 -17
  31. package/dist/browser/index.mjs.map +0 -1
  32. package/dist/neutral/containsAll.d.cts +0 -2
  33. package/dist/neutral/containsAll.d.cts.map +0 -1
  34. package/dist/neutral/containsAll.d.mts +0 -2
  35. package/dist/neutral/containsAll.d.mts.map +0 -1
  36. package/dist/neutral/containsAll.d.ts +0 -2
  37. package/dist/neutral/containsAll.d.ts.map +0 -1
  38. package/dist/neutral/distinct.d.cts +0 -2
  39. package/dist/neutral/distinct.d.cts.map +0 -1
  40. package/dist/neutral/distinct.d.mts +0 -2
  41. package/dist/neutral/distinct.d.mts.map +0 -1
  42. package/dist/neutral/distinct.d.ts +0 -2
  43. package/dist/neutral/distinct.d.ts.map +0 -1
  44. package/dist/neutral/flatten.d.cts +0 -2
  45. package/dist/neutral/flatten.d.cts.map +0 -1
  46. package/dist/neutral/flatten.d.mts +0 -2
  47. package/dist/neutral/flatten.d.mts.map +0 -1
  48. package/dist/neutral/flatten.d.ts +0 -2
  49. package/dist/neutral/flatten.d.ts.map +0 -1
  50. package/dist/neutral/index.cjs +0 -40
  51. package/dist/neutral/index.cjs.map +0 -1
  52. package/dist/neutral/index.d.cts +0 -4
  53. package/dist/neutral/index.d.cts.map +0 -1
  54. package/dist/neutral/index.d.mts +0 -4
  55. package/dist/neutral/index.d.mts.map +0 -1
  56. package/dist/neutral/index.d.ts.map +0 -1
  57. package/dist/node/containsAll.d.cts +0 -2
  58. package/dist/node/containsAll.d.cts.map +0 -1
  59. package/dist/node/containsAll.d.mts +0 -2
  60. package/dist/node/containsAll.d.mts.map +0 -1
  61. package/dist/node/containsAll.d.ts +0 -2
  62. package/dist/node/containsAll.d.ts.map +0 -1
  63. package/dist/node/distinct.d.cts +0 -2
  64. package/dist/node/distinct.d.cts.map +0 -1
  65. package/dist/node/distinct.d.mts +0 -2
  66. package/dist/node/distinct.d.mts.map +0 -1
  67. package/dist/node/distinct.d.ts +0 -2
  68. package/dist/node/distinct.d.ts.map +0 -1
  69. package/dist/node/flatten.d.cts +0 -2
  70. package/dist/node/flatten.d.cts.map +0 -1
  71. package/dist/node/flatten.d.mts +0 -2
  72. package/dist/node/flatten.d.mts.map +0 -1
  73. package/dist/node/flatten.d.ts +0 -2
  74. package/dist/node/flatten.d.ts.map +0 -1
  75. package/dist/node/index.cjs +0 -46
  76. package/dist/node/index.cjs.map +0 -1
  77. package/dist/node/index.d.cts +0 -4
  78. package/dist/node/index.d.cts.map +0 -1
  79. package/dist/node/index.d.mts +0 -4
  80. package/dist/node/index.d.mts.map +0 -1
  81. package/dist/node/index.d.ts +0 -4
  82. package/dist/node/index.d.ts.map +0 -1
  83. package/dist/node/index.mjs +0 -17
  84. package/dist/node/index.mjs.map +0 -1
@@ -1,4 +1,7 @@
1
- export * from './containsAll.ts';
2
- export * from './distinct.ts';
3
- export * from './flatten.ts';
4
- //# sourceMappingURL=index.d.ts.map
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 flatten: <T>(a?: T | ConcatArray<T>, b?: T | ConcatArray<T>) => T[];
6
+
7
+ export { containsAll, distinct, flatten };
package/package.json CHANGED
@@ -13,26 +13,19 @@
13
13
  "description": "Base functionality used throughout XY Labs TypeScript/JavaScript libraries",
14
14
  "exports": {
15
15
  ".": {
16
- "require": {
17
- "types": "./dist/neutral/index.d.cts",
18
- "default": "./dist/neutral/index.cjs"
19
- },
20
- "import": {
21
- "types": "./dist/neutral/index.d.ts",
22
- "default": "./dist/neutral/index.mjs"
23
- }
16
+ "types": "./dist/neutral/index.d.ts",
17
+ "default": "./dist/neutral/index.mjs"
24
18
  },
25
19
  "./package.json": "./package.json"
26
20
  },
27
- "main": "./dist/neutral/index.cjs",
28
21
  "types": "./dist/neutral/index.d.ts",
29
22
  "module": "./dist/neutral/index.mjs",
30
23
  "dependencies": {
31
- "@xylabs/exists": "^3.6.12"
24
+ "@xylabs/exists": "^4.0.1"
32
25
  },
33
26
  "devDependencies": {
34
- "@xylabs/ts-scripts-yarn3": "^3.15.14",
35
- "@xylabs/tsconfig": "^3.15.14",
27
+ "@xylabs/ts-scripts-yarn3": "^4.0.0-rc.15",
28
+ "@xylabs/tsconfig": "^4.0.0-rc.15",
36
29
  "typescript": "^5.5.4"
37
30
  },
38
31
  "engines": {
@@ -53,6 +46,6 @@
53
46
  "url": "https://github.com/xylabs/sdk-js.git"
54
47
  },
55
48
  "sideEffects": false,
56
- "version": "3.6.12",
49
+ "version": "4.0.1",
57
50
  "type": "module"
58
51
  }
package/xy.config.ts ADDED
@@ -0,0 +1,12 @@
1
+ import { XyTsupConfig } from '@xylabs/ts-scripts-yarn3'
2
+ const config: XyTsupConfig = {
3
+ compile: {
4
+ browser: {},
5
+ neutral: {
6
+ src: true,
7
+ },
8
+ node: {},
9
+ },
10
+ }
11
+
12
+ export default config
@@ -1,2 +0,0 @@
1
- export declare const containsAll: <T>(source: T[], target: T[]) => boolean;
2
- //# sourceMappingURL=containsAll.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"containsAll.d.ts","sourceRoot":"","sources":["../../src/containsAll.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,GAAI,CAAC,UAAU,CAAC,EAAE,UAAU,CAAC,EAAE,YAA0C,CAAA"}
@@ -1,2 +0,0 @@
1
- export declare const containsAll: <T>(source: T[], target: T[]) => boolean;
2
- //# sourceMappingURL=containsAll.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"containsAll.d.ts","sourceRoot":"","sources":["../../src/containsAll.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,GAAI,CAAC,UAAU,CAAC,EAAE,UAAU,CAAC,EAAE,YAA0C,CAAA"}
@@ -1,2 +0,0 @@
1
- export declare const containsAll: <T>(source: T[], target: T[]) => boolean;
2
- //# sourceMappingURL=containsAll.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"containsAll.d.ts","sourceRoot":"","sources":["../../src/containsAll.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,GAAI,CAAC,UAAU,CAAC,EAAE,UAAU,CAAC,EAAE,YAA0C,CAAA"}
@@ -1,2 +0,0 @@
1
- export declare const distinct: <T>(value: T, index: number, array: T[]) => boolean;
2
- //# sourceMappingURL=distinct.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"distinct.d.ts","sourceRoot":"","sources":["../../src/distinct.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,GAAI,CAAC,SAAS,CAAC,SAAS,MAAM,SAAS,CAAC,EAAE,YAAmC,CAAA"}
@@ -1,2 +0,0 @@
1
- export declare const distinct: <T>(value: T, index: number, array: T[]) => boolean;
2
- //# sourceMappingURL=distinct.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"distinct.d.ts","sourceRoot":"","sources":["../../src/distinct.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,GAAI,CAAC,SAAS,CAAC,SAAS,MAAM,SAAS,CAAC,EAAE,YAAmC,CAAA"}
@@ -1,2 +0,0 @@
1
- export declare const distinct: <T>(value: T, index: number, array: T[]) => boolean;
2
- //# sourceMappingURL=distinct.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"distinct.d.ts","sourceRoot":"","sources":["../../src/distinct.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,GAAI,CAAC,SAAS,CAAC,SAAS,MAAM,SAAS,CAAC,EAAE,YAAmC,CAAA"}
@@ -1,2 +0,0 @@
1
- export declare const flatten: <T>(a?: T | ConcatArray<T>, b?: T | ConcatArray<T>) => T[];
2
- //# sourceMappingURL=flatten.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"flatten.d.ts","sourceRoot":"","sources":["../../src/flatten.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,GAAI,CAAC,MAAM,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,KAAG,CAAC,EAG5E,CAAA"}
@@ -1,2 +0,0 @@
1
- export declare const flatten: <T>(a?: T | ConcatArray<T>, b?: T | ConcatArray<T>) => T[];
2
- //# sourceMappingURL=flatten.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"flatten.d.ts","sourceRoot":"","sources":["../../src/flatten.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,GAAI,CAAC,MAAM,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,KAAG,CAAC,EAG5E,CAAA"}
@@ -1,2 +0,0 @@
1
- export declare const flatten: <T>(a?: T | ConcatArray<T>, b?: T | ConcatArray<T>) => T[];
2
- //# sourceMappingURL=flatten.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"flatten.d.ts","sourceRoot":"","sources":["../../src/flatten.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,GAAI,CAAC,MAAM,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,KAAG,CAAC,EAG5E,CAAA"}
@@ -1,40 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/index.ts
21
- var src_exports = {};
22
- __export(src_exports, {
23
- containsAll: () => containsAll,
24
- distinct: () => distinct,
25
- flatten: () => flatten
26
- });
27
- module.exports = __toCommonJS(src_exports);
28
-
29
- // src/containsAll.ts
30
- var containsAll = (source, target) => target.every((i) => source.includes(i));
31
-
32
- // src/distinct.ts
33
- var distinct = (value, index, array) => array.indexOf(value) === index;
34
-
35
- // src/flatten.ts
36
- var import_exists = require("@xylabs/exists");
37
- var flatten = (a, b) => {
38
- return [].concat(a).concat(b).filter(import_exists.exists);
39
- };
40
- //# sourceMappingURL=index.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/index.ts","../../src/containsAll.ts","../../src/distinct.ts","../../src/flatten.ts"],"sourcesContent":["export * from './containsAll.ts'\nexport * from './distinct.ts'\nexport * from './flatten.ts'\n","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 // eslint-disable-next-line unicorn/prefer-spread\n return ([] as (T | undefined)[]).concat(a).concat(b).filter(exists)\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAO,IAAM,cAAc,CAAI,QAAa,WAAgB,OAAO,MAAM,OAAK,OAAO,SAAS,CAAC,CAAC;;;ACAzF,IAAM,WAAW,CAAI,OAAU,OAAe,UAAe,MAAM,QAAQ,KAAK,MAAM;;;ACA7F,oBAAuB;AAEhB,IAAM,UAAU,CAAI,GAAwB,MAAgC;AAEjF,SAAQ,CAAC,EAAwB,OAAO,CAAC,EAAE,OAAO,CAAC,EAAE,OAAO,oBAAM;AACpE;","names":[]}
@@ -1,4 +0,0 @@
1
- export * from './containsAll.ts';
2
- export * from './distinct.ts';
3
- export * from './flatten.ts';
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA"}
@@ -1,4 +0,0 @@
1
- export * from './containsAll.ts';
2
- export * from './distinct.ts';
3
- export * from './flatten.ts';
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA"}
@@ -1,4 +0,0 @@
1
- export * from './containsAll.ts';
2
- export * from './distinct.ts';
3
- export * from './flatten.ts';
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA"}
@@ -1,17 +0,0 @@
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
- };
17
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
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 // eslint-disable-next-line unicorn/prefer-spread\n return ([] as (T | undefined)[]).concat(a).concat(b).filter(exists)\n}\n"],"mappings":";AAAO,IAAM,cAAc,CAAI,QAAa,WAAgB,OAAO,MAAM,OAAK,OAAO,SAAS,CAAC,CAAC;;;ACAzF,IAAM,WAAW,CAAI,OAAU,OAAe,UAAe,MAAM,QAAQ,KAAK,MAAM;;;ACA7F,SAAS,cAAc;AAEhB,IAAM,UAAU,CAAI,GAAwB,MAAgC;AAEjF,SAAQ,CAAC,EAAwB,OAAO,CAAC,EAAE,OAAO,CAAC,EAAE,OAAO,MAAM;AACpE;","names":[]}
@@ -1,2 +0,0 @@
1
- export declare const containsAll: <T>(source: T[], target: T[]) => boolean;
2
- //# sourceMappingURL=containsAll.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"containsAll.d.ts","sourceRoot":"","sources":["../../src/containsAll.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,GAAI,CAAC,UAAU,CAAC,EAAE,UAAU,CAAC,EAAE,YAA0C,CAAA"}
@@ -1,2 +0,0 @@
1
- export declare const containsAll: <T>(source: T[], target: T[]) => boolean;
2
- //# sourceMappingURL=containsAll.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"containsAll.d.ts","sourceRoot":"","sources":["../../src/containsAll.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,GAAI,CAAC,UAAU,CAAC,EAAE,UAAU,CAAC,EAAE,YAA0C,CAAA"}
@@ -1,2 +0,0 @@
1
- export declare const containsAll: <T>(source: T[], target: T[]) => boolean;
2
- //# sourceMappingURL=containsAll.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"containsAll.d.ts","sourceRoot":"","sources":["../../src/containsAll.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,GAAI,CAAC,UAAU,CAAC,EAAE,UAAU,CAAC,EAAE,YAA0C,CAAA"}
@@ -1,2 +0,0 @@
1
- export declare const distinct: <T>(value: T, index: number, array: T[]) => boolean;
2
- //# sourceMappingURL=distinct.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"distinct.d.ts","sourceRoot":"","sources":["../../src/distinct.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,GAAI,CAAC,SAAS,CAAC,SAAS,MAAM,SAAS,CAAC,EAAE,YAAmC,CAAA"}
@@ -1,2 +0,0 @@
1
- export declare const distinct: <T>(value: T, index: number, array: T[]) => boolean;
2
- //# sourceMappingURL=distinct.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"distinct.d.ts","sourceRoot":"","sources":["../../src/distinct.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,GAAI,CAAC,SAAS,CAAC,SAAS,MAAM,SAAS,CAAC,EAAE,YAAmC,CAAA"}
@@ -1,2 +0,0 @@
1
- export declare const distinct: <T>(value: T, index: number, array: T[]) => boolean;
2
- //# sourceMappingURL=distinct.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"distinct.d.ts","sourceRoot":"","sources":["../../src/distinct.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,GAAI,CAAC,SAAS,CAAC,SAAS,MAAM,SAAS,CAAC,EAAE,YAAmC,CAAA"}
@@ -1,2 +0,0 @@
1
- export declare const flatten: <T>(a?: T | ConcatArray<T>, b?: T | ConcatArray<T>) => T[];
2
- //# sourceMappingURL=flatten.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"flatten.d.ts","sourceRoot":"","sources":["../../src/flatten.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,GAAI,CAAC,MAAM,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,KAAG,CAAC,EAG5E,CAAA"}
@@ -1,2 +0,0 @@
1
- export declare const flatten: <T>(a?: T | ConcatArray<T>, b?: T | ConcatArray<T>) => T[];
2
- //# sourceMappingURL=flatten.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"flatten.d.ts","sourceRoot":"","sources":["../../src/flatten.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,GAAI,CAAC,MAAM,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,KAAG,CAAC,EAG5E,CAAA"}
@@ -1,2 +0,0 @@
1
- export declare const flatten: <T>(a?: T | ConcatArray<T>, b?: T | ConcatArray<T>) => T[];
2
- //# sourceMappingURL=flatten.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"flatten.d.ts","sourceRoot":"","sources":["../../src/flatten.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,GAAI,CAAC,MAAM,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,KAAG,CAAC,EAG5E,CAAA"}
@@ -1,40 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/index.ts
21
- var src_exports = {};
22
- __export(src_exports, {
23
- containsAll: () => containsAll,
24
- distinct: () => distinct,
25
- flatten: () => flatten
26
- });
27
- module.exports = __toCommonJS(src_exports);
28
-
29
- // src/containsAll.ts
30
- var containsAll = (source, target) => target.every((i) => source.includes(i));
31
-
32
- // src/distinct.ts
33
- var distinct = (value, index, array) => array.indexOf(value) === index;
34
-
35
- // src/flatten.ts
36
- var import_exists = require("@xylabs/exists");
37
- var flatten = (a, b) => {
38
- return [].concat(a).concat(b).filter(import_exists.exists);
39
- };
40
- //# sourceMappingURL=index.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/index.ts","../../src/containsAll.ts","../../src/distinct.ts","../../src/flatten.ts"],"sourcesContent":["export * from './containsAll.ts'\nexport * from './distinct.ts'\nexport * from './flatten.ts'\n","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 // eslint-disable-next-line unicorn/prefer-spread\n return ([] as (T | undefined)[]).concat(a).concat(b).filter(exists)\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAO,IAAM,cAAc,CAAI,QAAa,WAAgB,OAAO,MAAM,OAAK,OAAO,SAAS,CAAC,CAAC;;;ACAzF,IAAM,WAAW,CAAI,OAAU,OAAe,UAAe,MAAM,QAAQ,KAAK,MAAM;;;ACA7F,oBAAuB;AAEhB,IAAM,UAAU,CAAI,GAAwB,MAAgC;AAEjF,SAAQ,CAAC,EAAwB,OAAO,CAAC,EAAE,OAAO,CAAC,EAAE,OAAO,oBAAM;AACpE;","names":[]}
@@ -1,4 +0,0 @@
1
- export * from './containsAll.ts';
2
- export * from './distinct.ts';
3
- export * from './flatten.ts';
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA"}
@@ -1,4 +0,0 @@
1
- export * from './containsAll.ts';
2
- export * from './distinct.ts';
3
- export * from './flatten.ts';
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA"}
@@ -1,2 +0,0 @@
1
- export declare const containsAll: <T>(source: T[], target: T[]) => boolean;
2
- //# sourceMappingURL=containsAll.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"containsAll.d.ts","sourceRoot":"","sources":["../../src/containsAll.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,GAAI,CAAC,UAAU,CAAC,EAAE,UAAU,CAAC,EAAE,YAA0C,CAAA"}
@@ -1,2 +0,0 @@
1
- export declare const containsAll: <T>(source: T[], target: T[]) => boolean;
2
- //# sourceMappingURL=containsAll.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"containsAll.d.ts","sourceRoot":"","sources":["../../src/containsAll.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,GAAI,CAAC,UAAU,CAAC,EAAE,UAAU,CAAC,EAAE,YAA0C,CAAA"}
@@ -1,2 +0,0 @@
1
- export declare const containsAll: <T>(source: T[], target: T[]) => boolean;
2
- //# sourceMappingURL=containsAll.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"containsAll.d.ts","sourceRoot":"","sources":["../../src/containsAll.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,GAAI,CAAC,UAAU,CAAC,EAAE,UAAU,CAAC,EAAE,YAA0C,CAAA"}
@@ -1,2 +0,0 @@
1
- export declare const distinct: <T>(value: T, index: number, array: T[]) => boolean;
2
- //# sourceMappingURL=distinct.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"distinct.d.ts","sourceRoot":"","sources":["../../src/distinct.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,GAAI,CAAC,SAAS,CAAC,SAAS,MAAM,SAAS,CAAC,EAAE,YAAmC,CAAA"}
@@ -1,2 +0,0 @@
1
- export declare const distinct: <T>(value: T, index: number, array: T[]) => boolean;
2
- //# sourceMappingURL=distinct.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"distinct.d.ts","sourceRoot":"","sources":["../../src/distinct.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,GAAI,CAAC,SAAS,CAAC,SAAS,MAAM,SAAS,CAAC,EAAE,YAAmC,CAAA"}
@@ -1,2 +0,0 @@
1
- export declare const distinct: <T>(value: T, index: number, array: T[]) => boolean;
2
- //# sourceMappingURL=distinct.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"distinct.d.ts","sourceRoot":"","sources":["../../src/distinct.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,GAAI,CAAC,SAAS,CAAC,SAAS,MAAM,SAAS,CAAC,EAAE,YAAmC,CAAA"}
@@ -1,2 +0,0 @@
1
- export declare const flatten: <T>(a?: T | ConcatArray<T>, b?: T | ConcatArray<T>) => T[];
2
- //# sourceMappingURL=flatten.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"flatten.d.ts","sourceRoot":"","sources":["../../src/flatten.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,GAAI,CAAC,MAAM,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,KAAG,CAAC,EAG5E,CAAA"}
@@ -1,2 +0,0 @@
1
- export declare const flatten: <T>(a?: T | ConcatArray<T>, b?: T | ConcatArray<T>) => T[];
2
- //# sourceMappingURL=flatten.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"flatten.d.ts","sourceRoot":"","sources":["../../src/flatten.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,GAAI,CAAC,MAAM,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,KAAG,CAAC,EAG5E,CAAA"}
@@ -1,2 +0,0 @@
1
- export declare const flatten: <T>(a?: T | ConcatArray<T>, b?: T | ConcatArray<T>) => T[];
2
- //# sourceMappingURL=flatten.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"flatten.d.ts","sourceRoot":"","sources":["../../src/flatten.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,GAAI,CAAC,MAAM,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,KAAG,CAAC,EAG5E,CAAA"}
@@ -1,46 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/index.ts
21
- var src_exports = {};
22
- __export(src_exports, {
23
- containsAll: () => containsAll,
24
- distinct: () => distinct,
25
- flatten: () => flatten
26
- });
27
- module.exports = __toCommonJS(src_exports);
28
-
29
- // src/containsAll.ts
30
- var containsAll = (source, target) => target.every((i) => source.includes(i));
31
-
32
- // src/distinct.ts
33
- var distinct = (value, index, array) => array.indexOf(value) === index;
34
-
35
- // src/flatten.ts
36
- var import_exists = require("@xylabs/exists");
37
- var flatten = (a, b) => {
38
- return [].concat(a).concat(b).filter(import_exists.exists);
39
- };
40
- // Annotate the CommonJS export names for ESM import in node:
41
- 0 && (module.exports = {
42
- containsAll,
43
- distinct,
44
- flatten
45
- });
46
- //# sourceMappingURL=index.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/index.ts","../../src/containsAll.ts","../../src/distinct.ts","../../src/flatten.ts"],"sourcesContent":["export * from './containsAll.ts'\nexport * from './distinct.ts'\nexport * from './flatten.ts'\n","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 // eslint-disable-next-line unicorn/prefer-spread\n return ([] as (T | undefined)[]).concat(a).concat(b).filter(exists)\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAO,IAAM,cAAc,CAAI,QAAa,WAAgB,OAAO,MAAM,OAAK,OAAO,SAAS,CAAC,CAAC;;;ACAzF,IAAM,WAAW,CAAI,OAAU,OAAe,UAAe,MAAM,QAAQ,KAAK,MAAM;;;ACA7F,oBAAuB;AAEhB,IAAM,UAAU,CAAI,GAAwB,MAAgC;AAEjF,SAAQ,CAAC,EAAwB,OAAO,CAAC,EAAE,OAAO,CAAC,EAAE,OAAO,oBAAM;AACpE;","names":[]}
@@ -1,4 +0,0 @@
1
- export * from './containsAll.ts';
2
- export * from './distinct.ts';
3
- export * from './flatten.ts';
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA"}
@@ -1,4 +0,0 @@
1
- export * from './containsAll.ts';
2
- export * from './distinct.ts';
3
- export * from './flatten.ts';
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA"}
@@ -1,4 +0,0 @@
1
- export * from './containsAll.ts';
2
- export * from './distinct.ts';
3
- export * from './flatten.ts';
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA"}
@@ -1,17 +0,0 @@
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
- };
17
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
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 // eslint-disable-next-line unicorn/prefer-spread\n return ([] as (T | undefined)[]).concat(a).concat(b).filter(exists)\n}\n"],"mappings":";AAAO,IAAM,cAAc,CAAI,QAAa,WAAgB,OAAO,MAAM,OAAK,OAAO,SAAS,CAAC,CAAC;;;ACAzF,IAAM,WAAW,CAAI,OAAU,OAAe,UAAe,MAAM,QAAQ,KAAK,MAAM;;;ACA7F,SAAS,cAAc;AAEhB,IAAM,UAAU,CAAI,GAAwB,MAAgC;AAEjF,SAAQ,CAAC,EAAwB,OAAO,CAAC,EAAE,OAAO,CAAC,EAAE,OAAO,MAAM;AACpE;","names":[]}