@xylabs/array 2.8.0 → 2.8.2

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.
@@ -0,0 +1,6 @@
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
@@ -0,0 +1 @@
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"}
package/dist/cjs/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./containsAll"), exports);
4
5
  tslib_1.__exportStar(require("./distinct"), exports);
5
6
  tslib_1.__exportStar(require("./flatten"), exports);
6
7
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,qDAA0B;AAC1B,oDAAyB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,wDAA6B;AAC7B,qDAA0B;AAC1B,oDAAyB"}
package/dist/docs.json CHANGED
@@ -8,22 +8,22 @@
8
8
  "children": [
9
9
  {
10
10
  "id": 1,
11
- "name": "distinct",
11
+ "name": "containsAll",
12
12
  "kind": 64,
13
13
  "kindString": "Function",
14
14
  "flags": {},
15
15
  "sources": [
16
16
  {
17
- "fileName": "distinct.ts",
17
+ "fileName": "containsAll.ts",
18
18
  "line": 1,
19
19
  "character": 13,
20
- "url": "https://github.com/xylabs/sdk-js/blob/9ad4029/packages/array/src/distinct.ts#L1"
20
+ "url": "https://github.com/xylabs/sdk-js/blob/238bcfa/packages/array/src/containsAll.ts#L1"
21
21
  }
22
22
  ],
23
23
  "signatures": [
24
24
  {
25
25
  "id": 2,
26
- "name": "distinct",
26
+ "name": "containsAll",
27
27
  "kind": 4096,
28
28
  "kindString": "Call signature",
29
29
  "flags": {},
@@ -39,18 +39,87 @@
39
39
  "parameters": [
40
40
  {
41
41
  "id": 4,
42
+ "name": "source",
43
+ "kind": 32768,
44
+ "kindString": "Parameter",
45
+ "flags": {},
46
+ "type": {
47
+ "type": "array",
48
+ "elementType": {
49
+ "type": "reference",
50
+ "id": 3,
51
+ "name": "T"
52
+ }
53
+ }
54
+ },
55
+ {
56
+ "id": 5,
57
+ "name": "target",
58
+ "kind": 32768,
59
+ "kindString": "Parameter",
60
+ "flags": {},
61
+ "type": {
62
+ "type": "array",
63
+ "elementType": {
64
+ "type": "reference",
65
+ "id": 3,
66
+ "name": "T"
67
+ }
68
+ }
69
+ }
70
+ ],
71
+ "type": {
72
+ "type": "intrinsic",
73
+ "name": "boolean"
74
+ }
75
+ }
76
+ ]
77
+ },
78
+ {
79
+ "id": 6,
80
+ "name": "distinct",
81
+ "kind": 64,
82
+ "kindString": "Function",
83
+ "flags": {},
84
+ "sources": [
85
+ {
86
+ "fileName": "distinct.ts",
87
+ "line": 1,
88
+ "character": 13,
89
+ "url": "https://github.com/xylabs/sdk-js/blob/238bcfa/packages/array/src/distinct.ts#L1"
90
+ }
91
+ ],
92
+ "signatures": [
93
+ {
94
+ "id": 7,
95
+ "name": "distinct",
96
+ "kind": 4096,
97
+ "kindString": "Call signature",
98
+ "flags": {},
99
+ "typeParameter": [
100
+ {
101
+ "id": 8,
102
+ "name": "T",
103
+ "kind": 131072,
104
+ "kindString": "Type parameter",
105
+ "flags": {}
106
+ }
107
+ ],
108
+ "parameters": [
109
+ {
110
+ "id": 9,
42
111
  "name": "value",
43
112
  "kind": 32768,
44
113
  "kindString": "Parameter",
45
114
  "flags": {},
46
115
  "type": {
47
116
  "type": "reference",
48
- "id": 3,
117
+ "id": 8,
49
118
  "name": "T"
50
119
  }
51
120
  },
52
121
  {
53
- "id": 5,
122
+ "id": 10,
54
123
  "name": "index",
55
124
  "kind": 32768,
56
125
  "kindString": "Parameter",
@@ -61,7 +130,7 @@
61
130
  }
62
131
  },
63
132
  {
64
- "id": 6,
133
+ "id": 11,
65
134
  "name": "array",
66
135
  "kind": 32768,
67
136
  "kindString": "Parameter",
@@ -70,7 +139,7 @@
70
139
  "type": "array",
71
140
  "elementType": {
72
141
  "type": "reference",
73
- "id": 3,
142
+ "id": 8,
74
143
  "name": "T"
75
144
  }
76
145
  }
@@ -84,7 +153,7 @@
84
153
  ]
85
154
  },
86
155
  {
87
- "id": 7,
156
+ "id": 12,
88
157
  "name": "flatten",
89
158
  "kind": 64,
90
159
  "kindString": "Function",
@@ -94,19 +163,19 @@
94
163
  "fileName": "flatten.ts",
95
164
  "line": 3,
96
165
  "character": 13,
97
- "url": "https://github.com/xylabs/sdk-js/blob/9ad4029/packages/array/src/flatten.ts#L3"
166
+ "url": "https://github.com/xylabs/sdk-js/blob/238bcfa/packages/array/src/flatten.ts#L3"
98
167
  }
99
168
  ],
100
169
  "signatures": [
101
170
  {
102
- "id": 8,
171
+ "id": 13,
103
172
  "name": "flatten",
104
173
  "kind": 4096,
105
174
  "kindString": "Call signature",
106
175
  "flags": {},
107
176
  "typeParameter": [
108
177
  {
109
- "id": 9,
178
+ "id": 14,
110
179
  "name": "T",
111
180
  "kind": 131072,
112
181
  "kindString": "Type parameter",
@@ -115,7 +184,7 @@
115
184
  ],
116
185
  "parameters": [
117
186
  {
118
- "id": 10,
187
+ "id": 15,
119
188
  "name": "a",
120
189
  "kind": 32768,
121
190
  "kindString": "Parameter",
@@ -127,7 +196,7 @@
127
196
  "types": [
128
197
  {
129
198
  "type": "reference",
130
- "id": 9,
199
+ "id": 14,
131
200
  "name": "T"
132
201
  },
133
202
  {
@@ -135,7 +204,7 @@
135
204
  "typeArguments": [
136
205
  {
137
206
  "type": "reference",
138
- "id": 9,
207
+ "id": 14,
139
208
  "name": "T"
140
209
  }
141
210
  ],
@@ -147,7 +216,7 @@
147
216
  }
148
217
  },
149
218
  {
150
- "id": 11,
219
+ "id": 16,
151
220
  "name": "b",
152
221
  "kind": 32768,
153
222
  "kindString": "Parameter",
@@ -159,7 +228,7 @@
159
228
  "types": [
160
229
  {
161
230
  "type": "reference",
162
- "id": 9,
231
+ "id": 14,
163
232
  "name": "T"
164
233
  },
165
234
  {
@@ -167,7 +236,7 @@
167
236
  "typeArguments": [
168
237
  {
169
238
  "type": "reference",
170
- "id": 9,
239
+ "id": 14,
171
240
  "name": "T"
172
241
  }
173
242
  ],
@@ -183,7 +252,7 @@
183
252
  "type": "array",
184
253
  "elementType": {
185
254
  "type": "reference",
186
- "id": 9,
255
+ "id": 14,
187
256
  "name": "T"
188
257
  }
189
258
  }
@@ -196,7 +265,8 @@
196
265
  "title": "Functions",
197
266
  "children": [
198
267
  1,
199
- 7
268
+ 6,
269
+ 12
200
270
  ]
201
271
  }
202
272
  ],
@@ -205,7 +275,7 @@
205
275
  "fileName": "index.ts",
206
276
  "line": 1,
207
277
  "character": 0,
208
- "url": "https://github.com/xylabs/sdk-js/blob/9ad4029/packages/array/src/index.ts#L1"
278
+ "url": "https://github.com/xylabs/sdk-js/blob/238bcfa/packages/array/src/index.ts#L1"
209
279
  }
210
280
  ]
211
281
  }
@@ -0,0 +1,2 @@
1
+ export const containsAll = (source, target) => target.every((i) => source.includes(i));
2
+ //# sourceMappingURL=containsAll.js.map
@@ -0,0 +1 @@
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"}
package/dist/esm/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ export * from './containsAll';
1
2
  export * from './distinct';
2
3
  export * from './flatten';
3
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA"}
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"}
@@ -0,0 +1,2 @@
1
+ export declare const containsAll: <T>(source: T[], target: T[]) => boolean;
2
+ //# sourceMappingURL=containsAll.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"containsAll.d.ts","sourceRoot":"","sources":["../../src/containsAll.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,0CAA2E,CAAA"}
@@ -1,3 +1,4 @@
1
+ export * from './containsAll';
1
2
  export * from './distinct';
2
3
  export * from './flatten';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA"}
package/package.json CHANGED
@@ -34,7 +34,7 @@
34
34
  "./package.json": "./package.json"
35
35
  },
36
36
  "dependencies": {
37
- "@xylabs/exists": "^2.8.0"
37
+ "@xylabs/exists": "^2.8.2"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@xylabs/ts-scripts-yarn3": "^2.17.13"
@@ -54,5 +54,5 @@
54
54
  "url": "https://github.com/xylabs/sdk-js.git"
55
55
  },
56
56
  "sideEffects": false,
57
- "version": "2.8.0"
57
+ "version": "2.8.2"
58
58
  }
@@ -0,0 +1 @@
1
+ export const containsAll = <T>(source: T[], target: T[]) => target.every((i) => source.includes(i))
package/src/index.ts CHANGED
@@ -1,2 +1,3 @@
1
+ export * from './containsAll'
1
2
  export * from './distinct'
2
3
  export * from './flatten'