@xylabs/array 2.9.3 → 2.10.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 (42) hide show
  1. package/dist/index.d.mts +7 -0
  2. package/dist/index.d.ts +7 -0
  3. package/dist/index.js +46 -0
  4. package/dist/index.js.map +1 -0
  5. package/dist/index.mjs +17 -0
  6. package/dist/index.mjs.map +1 -0
  7. package/package.json +29 -15
  8. package/tsup.config.ts +16 -0
  9. package/dist/cjs/containsAll.js +0 -6
  10. package/dist/cjs/containsAll.js.map +0 -1
  11. package/dist/cjs/distinct.js +0 -6
  12. package/dist/cjs/distinct.js.map +0 -1
  13. package/dist/cjs/flatten.js +0 -9
  14. package/dist/cjs/flatten.js.map +0 -1
  15. package/dist/cjs/index.js +0 -7
  16. package/dist/cjs/index.js.map +0 -1
  17. package/dist/docs.json +0 -404
  18. package/dist/esm/containsAll.js +0 -2
  19. package/dist/esm/containsAll.js.map +0 -1
  20. package/dist/esm/distinct.js +0 -2
  21. package/dist/esm/distinct.js.map +0 -1
  22. package/dist/esm/flatten.js +0 -5
  23. package/dist/esm/flatten.js.map +0 -1
  24. package/dist/esm/index.js +0 -4
  25. package/dist/esm/index.js.map +0 -1
  26. package/dist/types/containsAll.d.ts +0 -2
  27. package/dist/types/containsAll.d.ts.map +0 -1
  28. package/dist/types/distinct.d.ts +0 -2
  29. package/dist/types/distinct.d.ts.map +0 -1
  30. package/dist/types/flatten.d.ts +0 -2
  31. package/dist/types/flatten.d.ts.map +0 -1
  32. package/dist/types/index.d.ts +0 -4
  33. package/dist/types/index.d.ts.map +0 -1
  34. package/docs/assets/highlight.css +0 -50
  35. package/docs/assets/main.js +0 -58
  36. package/docs/assets/search.js +0 -1
  37. package/docs/assets/style.css +0 -1367
  38. package/docs/functions/containsAll.html +0 -59
  39. package/docs/functions/distinct.html +0 -61
  40. package/docs/functions/flatten.html +0 -59
  41. package/docs/index.html +0 -84
  42. package/docs/modules.html +0 -46
@@ -0,0 +1,7 @@
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> | undefined, b?: T | ConcatArray<T> | undefined) => T[];
6
+
7
+ export { containsAll, distinct, flatten };
@@ -0,0 +1,7 @@
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> | undefined, b?: T | ConcatArray<T> | undefined) => T[];
6
+
7
+ export { containsAll, distinct, flatten };
package/dist/index.js ADDED
@@ -0,0 +1,46 @@
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.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts","../src/containsAll.ts","../src/distinct.ts","../src/flatten.ts"],"sourcesContent":["export * from './containsAll'\nexport * from './distinct'\nexport * from './flatten'\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 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,CAAC,MAAM,OAAO,SAAS,CAAC,CAAC;;;ACA3F,IAAM,WAAW,CAAI,OAAU,OAAe,UAAe,MAAM,QAAQ,KAAK,MAAM;;;ACA7F,oBAAuB;AAEhB,IAAM,UAAU,CAAI,GAAwB,MAAgC;AACjF,SAAQ,CAAC,EAAwB,OAAO,CAAC,EAAE,OAAO,CAAC,EAAE,OAAO,oBAAM;AACpE;","names":[]}
package/dist/index.mjs ADDED
@@ -0,0 +1,17 @@
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
@@ -0,0 +1 @@
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
@@ -11,33 +11,47 @@
11
11
  "url": "https://github.com/xylabs/sdk-js/issues"
12
12
  },
13
13
  "description": "Base functionality used throughout XY Labs TypeScript/JavaScript libraries",
14
- "browser": "dist/esm/index.js",
15
- "main": "dist/cjs/index.js",
16
- "module": "dist/esm/index.js",
17
14
  "docs": "dist/docs.json",
18
- "types": "dist/types/index.d.ts",
15
+ "types": "dist/index.d.ts",
19
16
  "exports": {
20
17
  ".": {
21
- "node": {
22
- "import": "./dist/esm/index.js",
23
- "require": "./dist/cjs/index.js"
18
+ "require": {
19
+ "types": "./dist/index.d.ts",
20
+ "default": "./dist/index.js"
24
21
  },
25
- "browser": {
26
- "import": "./dist/esm/index.js",
27
- "require": "./dist/cjs/index.js"
28
- },
29
- "default": "./dist/esm/index.js"
22
+ "import": {
23
+ "types": "./dist/index.d.mts",
24
+ "default": "./dist/index.mjs"
25
+ }
30
26
  },
31
27
  "./dist/docs.json": {
32
28
  "default": "./dist/docs.json"
33
29
  },
30
+ "./cjs": {
31
+ "default": "./dist/index.js"
32
+ },
33
+ "./docs": {
34
+ "default": "./dist/docs.json"
35
+ },
36
+ "./esm": {
37
+ "default": "./dist/index.mjs"
38
+ },
34
39
  "./package.json": "./package.json"
35
40
  },
41
+ "main": "dist/index.js",
42
+ "module": "dist/index.mjs",
43
+ "scripts": {
44
+ "package-compile": "tsup && publint",
45
+ "package-recompile": "tsup && publint"
46
+ },
36
47
  "dependencies": {
37
- "@xylabs/exists": "^2.9.3"
48
+ "@xylabs/exists": "~2.10.1"
38
49
  },
39
50
  "devDependencies": {
40
- "@xylabs/ts-scripts-yarn3": "^2.17.17"
51
+ "@xylabs/ts-scripts-yarn3": "^2.19.5",
52
+ "@xylabs/tsconfig": "^2.19.5",
53
+ "publint": "^0.2.2",
54
+ "tsup": "^7.2.0"
41
55
  },
42
56
  "homepage": "https://xylabs.com",
43
57
  "keywords": [
@@ -54,5 +68,5 @@
54
68
  "url": "https://github.com/xylabs/sdk-js.git"
55
69
  },
56
70
  "sideEffects": false,
57
- "version": "2.9.3"
71
+ "version": "2.10.1"
58
72
  }
package/tsup.config.ts ADDED
@@ -0,0 +1,16 @@
1
+ import { defineConfig } from 'tsup'
2
+
3
+ // eslint-disable-next-line import/no-default-export
4
+ export default defineConfig({
5
+ bundle: true,
6
+ cjsInterop: true,
7
+ clean: true,
8
+ dts: {
9
+ entry: ['src/index.ts'],
10
+ },
11
+ entry: ['src/index.ts'],
12
+ format: ['cjs', 'esm'],
13
+ sourcemap: true,
14
+ splitting: false,
15
+ tsconfig: 'tsconfig.build.json',
16
+ })
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.containsAll = void 0;
4
- const containsAll = (source, target) => target.every((i) => source.includes(i));
5
- exports.containsAll = containsAll;
6
- //# sourceMappingURL=containsAll.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"containsAll.js","sourceRoot":"","sources":["../../src/containsAll.ts"],"names":[],"mappings":";;;AAAO,MAAM,WAAW,GAAG,CAAI,MAAW,EAAE,MAAW,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAA;AAAtF,QAAA,WAAW,eAA2E"}
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.distinct = void 0;
4
- const distinct = (value, index, array) => array.indexOf(value) === index;
5
- exports.distinct = distinct;
6
- //# sourceMappingURL=distinct.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"distinct.js","sourceRoot":"","sources":["../../src/distinct.ts"],"names":[],"mappings":";;;AAAO,MAAM,QAAQ,GAAG,CAAI,KAAQ,EAAE,KAAa,EAAE,KAAU,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,KAAK,CAAA;AAArF,QAAA,QAAQ,YAA6E"}
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.flatten = void 0;
4
- const exists_1 = require("@xylabs/exists");
5
- const flatten = (a, b) => {
6
- return [].concat(a).concat(b).filter(exists_1.exists);
7
- };
8
- exports.flatten = flatten;
9
- //# sourceMappingURL=flatten.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"flatten.js","sourceRoot":"","sources":["../../src/flatten.ts"],"names":[],"mappings":";;;AAAA,2CAAuC;AAEhC,MAAM,OAAO,GAAG,CAAI,CAAsB,EAAE,CAAsB,EAAO,EAAE;IAChF,OAAQ,EAAwB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,eAAM,CAAC,CAAA;AACrE,CAAC,CAAA;AAFY,QAAA,OAAO,WAEnB"}
package/dist/cjs/index.js DELETED
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./containsAll"), exports);
5
- tslib_1.__exportStar(require("./distinct"), exports);
6
- tslib_1.__exportStar(require("./flatten"), exports);
7
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,wDAA6B;AAC7B,qDAA0B;AAC1B,oDAAyB"}
package/dist/docs.json DELETED
@@ -1,404 +0,0 @@
1
- {
2
- "id": 0,
3
- "name": "@xylabs/array",
4
- "variant": "project",
5
- "kind": 1,
6
- "flags": {},
7
- "children": [
8
- {
9
- "id": 1,
10
- "name": "containsAll",
11
- "variant": "declaration",
12
- "kind": 64,
13
- "flags": {},
14
- "sources": [
15
- {
16
- "fileName": "containsAll.ts",
17
- "line": 1,
18
- "character": 13,
19
- "url": "https://github.com/xylabs/sdk-js/blob/de632cf/packages/array/src/containsAll.ts#L1"
20
- }
21
- ],
22
- "signatures": [
23
- {
24
- "id": 2,
25
- "name": "containsAll",
26
- "variant": "signature",
27
- "kind": 4096,
28
- "flags": {},
29
- "sources": [
30
- {
31
- "fileName": "containsAll.ts",
32
- "line": 1,
33
- "character": 27,
34
- "url": "https://github.com/xylabs/sdk-js/blob/de632cf/packages/array/src/containsAll.ts#L1"
35
- }
36
- ],
37
- "typeParameter": [
38
- {
39
- "id": 3,
40
- "name": "T",
41
- "variant": "typeParam",
42
- "kind": 131072,
43
- "flags": {}
44
- }
45
- ],
46
- "parameters": [
47
- {
48
- "id": 4,
49
- "name": "source",
50
- "variant": "param",
51
- "kind": 32768,
52
- "flags": {},
53
- "type": {
54
- "type": "array",
55
- "elementType": {
56
- "type": "reference",
57
- "target": -1,
58
- "name": "T",
59
- "refersToTypeParameter": true
60
- }
61
- }
62
- },
63
- {
64
- "id": 5,
65
- "name": "target",
66
- "variant": "param",
67
- "kind": 32768,
68
- "flags": {},
69
- "type": {
70
- "type": "array",
71
- "elementType": {
72
- "type": "reference",
73
- "target": -1,
74
- "name": "T",
75
- "refersToTypeParameter": true
76
- }
77
- }
78
- }
79
- ],
80
- "type": {
81
- "type": "intrinsic",
82
- "name": "boolean"
83
- }
84
- }
85
- ]
86
- },
87
- {
88
- "id": 6,
89
- "name": "distinct",
90
- "variant": "declaration",
91
- "kind": 64,
92
- "flags": {},
93
- "sources": [
94
- {
95
- "fileName": "distinct.ts",
96
- "line": 1,
97
- "character": 13,
98
- "url": "https://github.com/xylabs/sdk-js/blob/de632cf/packages/array/src/distinct.ts#L1"
99
- }
100
- ],
101
- "signatures": [
102
- {
103
- "id": 7,
104
- "name": "distinct",
105
- "variant": "signature",
106
- "kind": 4096,
107
- "flags": {},
108
- "sources": [
109
- {
110
- "fileName": "distinct.ts",
111
- "line": 1,
112
- "character": 24,
113
- "url": "https://github.com/xylabs/sdk-js/blob/de632cf/packages/array/src/distinct.ts#L1"
114
- }
115
- ],
116
- "typeParameter": [
117
- {
118
- "id": 8,
119
- "name": "T",
120
- "variant": "typeParam",
121
- "kind": 131072,
122
- "flags": {}
123
- }
124
- ],
125
- "parameters": [
126
- {
127
- "id": 9,
128
- "name": "value",
129
- "variant": "param",
130
- "kind": 32768,
131
- "flags": {},
132
- "type": {
133
- "type": "reference",
134
- "target": -1,
135
- "name": "T",
136
- "refersToTypeParameter": true
137
- }
138
- },
139
- {
140
- "id": 10,
141
- "name": "index",
142
- "variant": "param",
143
- "kind": 32768,
144
- "flags": {},
145
- "type": {
146
- "type": "intrinsic",
147
- "name": "number"
148
- }
149
- },
150
- {
151
- "id": 11,
152
- "name": "array",
153
- "variant": "param",
154
- "kind": 32768,
155
- "flags": {},
156
- "type": {
157
- "type": "array",
158
- "elementType": {
159
- "type": "reference",
160
- "target": -1,
161
- "name": "T",
162
- "refersToTypeParameter": true
163
- }
164
- }
165
- }
166
- ],
167
- "type": {
168
- "type": "intrinsic",
169
- "name": "boolean"
170
- }
171
- }
172
- ]
173
- },
174
- {
175
- "id": 12,
176
- "name": "flatten",
177
- "variant": "declaration",
178
- "kind": 64,
179
- "flags": {},
180
- "sources": [
181
- {
182
- "fileName": "flatten.ts",
183
- "line": 3,
184
- "character": 13,
185
- "url": "https://github.com/xylabs/sdk-js/blob/de632cf/packages/array/src/flatten.ts#L3"
186
- }
187
- ],
188
- "signatures": [
189
- {
190
- "id": 13,
191
- "name": "flatten",
192
- "variant": "signature",
193
- "kind": 4096,
194
- "flags": {},
195
- "sources": [
196
- {
197
- "fileName": "flatten.ts",
198
- "line": 3,
199
- "character": 23,
200
- "url": "https://github.com/xylabs/sdk-js/blob/de632cf/packages/array/src/flatten.ts#L3"
201
- }
202
- ],
203
- "typeParameter": [
204
- {
205
- "id": 14,
206
- "name": "T",
207
- "variant": "typeParam",
208
- "kind": 131072,
209
- "flags": {}
210
- }
211
- ],
212
- "parameters": [
213
- {
214
- "id": 15,
215
- "name": "a",
216
- "variant": "param",
217
- "kind": 32768,
218
- "flags": {
219
- "isOptional": true
220
- },
221
- "type": {
222
- "type": "union",
223
- "types": [
224
- {
225
- "type": "reference",
226
- "target": -1,
227
- "name": "T",
228
- "refersToTypeParameter": true
229
- },
230
- {
231
- "type": "reference",
232
- "target": {
233
- "sourceFileName": "../../node_modules/typescript/lib/lib.es5.d.ts",
234
- "qualifiedName": "ConcatArray"
235
- },
236
- "typeArguments": [
237
- {
238
- "type": "reference",
239
- "target": -1,
240
- "name": "T",
241
- "refersToTypeParameter": true
242
- }
243
- ],
244
- "name": "ConcatArray",
245
- "package": "typescript"
246
- }
247
- ]
248
- }
249
- },
250
- {
251
- "id": 16,
252
- "name": "b",
253
- "variant": "param",
254
- "kind": 32768,
255
- "flags": {
256
- "isOptional": true
257
- },
258
- "type": {
259
- "type": "union",
260
- "types": [
261
- {
262
- "type": "reference",
263
- "target": -1,
264
- "name": "T",
265
- "refersToTypeParameter": true
266
- },
267
- {
268
- "type": "reference",
269
- "target": {
270
- "sourceFileName": "../../node_modules/typescript/lib/lib.es5.d.ts",
271
- "qualifiedName": "ConcatArray"
272
- },
273
- "typeArguments": [
274
- {
275
- "type": "reference",
276
- "target": -1,
277
- "name": "T",
278
- "refersToTypeParameter": true
279
- }
280
- ],
281
- "name": "ConcatArray",
282
- "package": "typescript"
283
- }
284
- ]
285
- }
286
- }
287
- ],
288
- "type": {
289
- "type": "array",
290
- "elementType": {
291
- "type": "reference",
292
- "target": -1,
293
- "name": "T",
294
- "refersToTypeParameter": true
295
- }
296
- }
297
- }
298
- ]
299
- }
300
- ],
301
- "groups": [
302
- {
303
- "title": "Functions",
304
- "children": [
305
- 1,
306
- 6,
307
- 12
308
- ]
309
- }
310
- ],
311
- "packageName": "@xylabs/array",
312
- "readme": [
313
- {
314
- "kind": "text",
315
- "text": "[![logo][]](https://xylabs.com)\n\n# @xylabs/sdk-js\n\n[![main-build][]][main-build-link]\n[![beta-build][]][beta-build-link]\n[![npm-badge][]][npm-link]\n[![bch-badge][]][bch-link]\n[![codacy-badge][]][codacy-link]\n[![codeclimate-badge][]][codeclimate-link]\n[![snyk-badge][]][snyk-link]\n\n## Table of Contents\n\n- [Description](#description)\n- [Install](#install)\n- [Scripts](#scripts)\n- [Maintainers](#maintainers)\n- [License](#license)\n- [Credits](#credits)\n\n## Description\n\nSDK for base code for Typescript and Javascript Libraries.\n\n## Install\n\nUsing npm:\n\n"
316
- },
317
- {
318
- "kind": "code",
319
- "text": "```sh\nnpm i --save @xylabs/sdk-js\n```"
320
- },
321
- {
322
- "kind": "text",
323
- "text": "\n\nUsing yarn:\n\n"
324
- },
325
- {
326
- "kind": "code",
327
- "text": "```sh\nyarn add @xylabs/sdk-js\n```"
328
- },
329
- {
330
- "kind": "text",
331
- "text": "\n\n## Scripts\n\nSee [ts-scripts](https://github.com/xylabs/ts-scripts/blob/main/README.md)\nfor list of shared scripts.\n\n## Maintainers\n\n- [Arie Trouw](https://github.com/arietrouw) (<https://arietrouw.com>)\n\n## License\n\nSee the [LICENSE](LICENSE) file for license details\n\n## Credits\n\n[Made with 🔥 and ❄️ by XY Labs](https://xylabs.com)\n\n[logo]: https://cdn.xy.company/img/brand/XYPersistentCompany_Logo_Icon_Colored.svg\n[main-build]: https://github.com/xylabs/sdk-js/actions/workflows/build-main.yml/badge.svg\n[main-build-link]: https://github.com/xylabs/sdk-js/actions/workflows/build-main.yml\n[beta-build]: https://github.com/xylabs/sdk-js/actions/workflows/build-beta.yml/badge.svg\n[beta-build-link]: https://github.com/xylabs/sdk-js/actions/workflows/build-beta.yml\n[npm-badge]: https://img.shields.io/npm/v/@xylabs/sdk-js.svg\n[npm-link]: https://www.npmjs.com/package/@xylabs/sdk-js\n[bch-badge]: https://bettercodehub.com/edge/badge/xylabs/sdk-js?branch=main\n[bch-link]: https://bettercodehub.com/results/xylabs/sdk-js\n[codacy-badge]: https://app.codacy.com/project/badge/Grade/c8e15e14f37741c18cfb47ac7245c698\n[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\n[codeclimate-badge]: https://api.codeclimate.com/v1/badges/c5eb068f806f0b047ea7/maintainability\n[codeclimate-link]: https://codeclimate.com/github/xylabs/sdk-js/maintainability\n[snyk-badge]: https://snyk.io/test/github/xylabs/sdk-js/badge.svg?targetFile=package.json\n[snyk-link]: https://snyk.io/test/github/xylabs/sdk-js?targetFile=package.json"
332
- }
333
- ],
334
- "symbolIdMap": {
335
- "0": {
336
- "sourceFileName": "src/index.ts",
337
- "qualifiedName": ""
338
- },
339
- "1": {
340
- "sourceFileName": "src/containsAll.ts",
341
- "qualifiedName": "containsAll"
342
- },
343
- "2": {
344
- "sourceFileName": "src/containsAll.ts",
345
- "qualifiedName": "containsAll"
346
- },
347
- "3": {
348
- "sourceFileName": "src/containsAll.ts",
349
- "qualifiedName": "T"
350
- },
351
- "4": {
352
- "sourceFileName": "src/containsAll.ts",
353
- "qualifiedName": "source"
354
- },
355
- "5": {
356
- "sourceFileName": "src/containsAll.ts",
357
- "qualifiedName": "target"
358
- },
359
- "6": {
360
- "sourceFileName": "src/distinct.ts",
361
- "qualifiedName": "distinct"
362
- },
363
- "7": {
364
- "sourceFileName": "src/distinct.ts",
365
- "qualifiedName": "distinct"
366
- },
367
- "8": {
368
- "sourceFileName": "src/distinct.ts",
369
- "qualifiedName": "T"
370
- },
371
- "9": {
372
- "sourceFileName": "src/distinct.ts",
373
- "qualifiedName": "value"
374
- },
375
- "10": {
376
- "sourceFileName": "src/distinct.ts",
377
- "qualifiedName": "index"
378
- },
379
- "11": {
380
- "sourceFileName": "src/distinct.ts",
381
- "qualifiedName": "array"
382
- },
383
- "12": {
384
- "sourceFileName": "src/flatten.ts",
385
- "qualifiedName": "flatten"
386
- },
387
- "13": {
388
- "sourceFileName": "src/flatten.ts",
389
- "qualifiedName": "flatten"
390
- },
391
- "14": {
392
- "sourceFileName": "src/flatten.ts",
393
- "qualifiedName": "T"
394
- },
395
- "15": {
396
- "sourceFileName": "src/flatten.ts",
397
- "qualifiedName": "a"
398
- },
399
- "16": {
400
- "sourceFileName": "src/flatten.ts",
401
- "qualifiedName": "b"
402
- }
403
- }
404
- }
@@ -1,2 +0,0 @@
1
- export const containsAll = (source, target) => target.every((i) => source.includes(i));
2
- //# sourceMappingURL=containsAll.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"containsAll.js","sourceRoot":"","sources":["../../src/containsAll.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG,CAAI,MAAW,EAAE,MAAW,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAA"}
@@ -1,2 +0,0 @@
1
- export const distinct = (value, index, array) => array.indexOf(value) === index;
2
- //# sourceMappingURL=distinct.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"distinct.js","sourceRoot":"","sources":["../../src/distinct.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAI,KAAQ,EAAE,KAAa,EAAE,KAAU,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,KAAK,CAAA"}
@@ -1,5 +0,0 @@
1
- import { exists } from '@xylabs/exists';
2
- export const flatten = (a, b) => {
3
- return [].concat(a).concat(b).filter(exists);
4
- };
5
- //# sourceMappingURL=flatten.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"flatten.js","sourceRoot":"","sources":["../../src/flatten.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AAEvC,MAAM,CAAC,MAAM,OAAO,GAAG,CAAI,CAAsB,EAAE,CAAsB,EAAO,EAAE;IAChF,OAAQ,EAAwB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;AACrE,CAAC,CAAA"}
package/dist/esm/index.js DELETED
@@ -1,4 +0,0 @@
1
- export * from './containsAll';
2
- export * from './distinct';
3
- export * from './flatten';
4
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA"}
@@ -1,2 +0,0 @@
1
- export declare const containsAll: <T>(source: T[], target: T[]) => boolean;
2
- //# sourceMappingURL=containsAll.d.ts.map