@xylabs/array 2.11.21 → 2.11.23
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/dist/browser/containsAll.cjs +1 -3
- package/dist/browser/containsAll.cjs.map +1 -1
- package/dist/browser/containsAll.js +1 -2
- package/dist/browser/containsAll.js.map +1 -1
- package/dist/browser/distinct.cjs +1 -3
- package/dist/browser/distinct.cjs.map +1 -1
- package/dist/browser/distinct.js +1 -2
- package/dist/browser/distinct.js.map +1 -1
- package/dist/browser/flatten.cjs +1 -3
- package/dist/browser/flatten.cjs.map +1 -1
- package/dist/browser/flatten.js +1 -2
- package/dist/browser/flatten.js.map +1 -1
- package/dist/browser/index.cjs +4 -23
- package/dist/browser/index.cjs.map +1 -1
- package/dist/browser/index.js +3 -16
- package/dist/browser/index.js.map +1 -1
- package/dist/node/containsAll.js +3 -1
- package/dist/node/containsAll.js.map +1 -1
- package/dist/node/containsAll.mjs +2 -1
- package/dist/node/containsAll.mjs.map +1 -1
- package/dist/node/distinct.js +3 -1
- package/dist/node/distinct.js.map +1 -1
- package/dist/node/distinct.mjs +2 -1
- package/dist/node/distinct.mjs.map +1 -1
- package/dist/node/flatten.js +3 -1
- package/dist/node/flatten.js.map +1 -1
- package/dist/node/flatten.mjs +2 -1
- package/dist/node/flatten.mjs.map +1 -1
- package/dist/node/index.js +26 -7
- package/dist/node/index.js.map +1 -1
- package/dist/node/index.mjs +16 -3
- package/dist/node/index.mjs.map +1 -1
- package/package.json +4 -4
|
@@ -16,12 +16,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/containsAll.ts
|
|
21
19
|
var containsAll_exports = {};
|
|
22
20
|
__export(containsAll_exports, {
|
|
23
21
|
containsAll: () => containsAll
|
|
24
22
|
});
|
|
25
23
|
module.exports = __toCommonJS(containsAll_exports);
|
|
26
|
-
|
|
24
|
+
const containsAll = (source, target) => target.every((i) => source.includes(i));
|
|
27
25
|
//# sourceMappingURL=containsAll.cjs.map
|
|
@@ -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":"
|
|
1
|
+
{"version":3,"sources":["../../src/containsAll.ts"],"sourcesContent":["export const containsAll = <T>(source: T[], target: T[]) => target.every((i) => source.includes(i))\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,cAAc,CAAI,QAAa,WAAgB,OAAO,MAAM,CAAC,MAAM,OAAO,SAAS,CAAC,CAAC;","names":[]}
|
|
@@ -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":"
|
|
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":[]}
|
|
@@ -16,12 +16,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/distinct.ts
|
|
21
19
|
var distinct_exports = {};
|
|
22
20
|
__export(distinct_exports, {
|
|
23
21
|
distinct: () => distinct
|
|
24
22
|
});
|
|
25
23
|
module.exports = __toCommonJS(distinct_exports);
|
|
26
|
-
|
|
24
|
+
const distinct = (value, index, array) => array.indexOf(value) === index;
|
|
27
25
|
//# sourceMappingURL=distinct.cjs.map
|
|
@@ -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":"
|
|
1
|
+
{"version":3,"sources":["../../src/distinct.ts"],"sourcesContent":["export const distinct = <T>(value: T, index: number, array: T[]) => array.indexOf(value) === index\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,WAAW,CAAI,OAAU,OAAe,UAAe,MAAM,QAAQ,KAAK,MAAM;","names":[]}
|
package/dist/browser/distinct.js
CHANGED
|
@@ -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":"
|
|
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":[]}
|
package/dist/browser/flatten.cjs
CHANGED
|
@@ -16,15 +16,13 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/flatten.ts
|
|
21
19
|
var flatten_exports = {};
|
|
22
20
|
__export(flatten_exports, {
|
|
23
21
|
flatten: () => flatten
|
|
24
22
|
});
|
|
25
23
|
module.exports = __toCommonJS(flatten_exports);
|
|
26
24
|
var import_exists = require("@xylabs/exists");
|
|
27
|
-
|
|
25
|
+
const flatten = (a, b) => {
|
|
28
26
|
return [].concat(a).concat(b).filter(import_exists.exists);
|
|
29
27
|
};
|
|
30
28
|
//# sourceMappingURL=flatten.cjs.map
|
|
@@ -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":"
|
|
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;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAuB;AAEhB,MAAM,UAAU,CAAI,GAAwB,MAAgC;AACjF,SAAQ,CAAC,EAAwB,OAAO,CAAC,EAAE,OAAO,CAAC,EAAE,OAAO,oBAAM;AACpE;","names":[]}
|
package/dist/browser/flatten.js
CHANGED
|
@@ -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":"
|
|
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":[]}
|
package/dist/browser/index.cjs
CHANGED
|
@@ -3,10 +3,6 @@ var __defProp = Object.defineProperty;
|
|
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
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
6
|
var __copyProps = (to, from, except, desc) => {
|
|
11
7
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
8
|
for (let key of __getOwnPropNames(from))
|
|
@@ -15,26 +11,11 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
11
|
}
|
|
16
12
|
return to;
|
|
17
13
|
};
|
|
14
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
18
15
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/index.ts
|
|
21
16
|
var src_exports = {};
|
|
22
|
-
__export(src_exports, {
|
|
23
|
-
containsAll: () => containsAll,
|
|
24
|
-
distinct: () => distinct,
|
|
25
|
-
flatten: () => flatten
|
|
26
|
-
});
|
|
27
17
|
module.exports = __toCommonJS(src_exports);
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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
|
-
};
|
|
18
|
+
__reExport(src_exports, require("./containsAll"), module.exports);
|
|
19
|
+
__reExport(src_exports, require("./distinct"), module.exports);
|
|
20
|
+
__reExport(src_exports, require("./flatten"), module.exports);
|
|
40
21
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts"
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export * from './containsAll'\nexport * from './distinct'\nexport * from './flatten'\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,wBAAc,0BAAd;AACA,wBAAc,uBADd;AAEA,wBAAc,sBAFd;","names":[]}
|
package/dist/browser/index.js
CHANGED
|
@@ -1,17 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
-
};
|
|
1
|
+
export * from "./containsAll";
|
|
2
|
+
export * from "./distinct";
|
|
3
|
+
export * from "./flatten";
|
|
17
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/
|
|
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":[]}
|
package/dist/node/containsAll.js
CHANGED
|
@@ -16,12 +16,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/containsAll.ts
|
|
19
21
|
var containsAll_exports = {};
|
|
20
22
|
__export(containsAll_exports, {
|
|
21
23
|
containsAll: () => containsAll
|
|
22
24
|
});
|
|
23
25
|
module.exports = __toCommonJS(containsAll_exports);
|
|
24
|
-
|
|
26
|
+
var containsAll = (source, target) => target.every((i) => source.includes(i));
|
|
25
27
|
// Annotate the CommonJS export names for ESM import in node:
|
|
26
28
|
0 && (module.exports = {
|
|
27
29
|
containsAll
|
|
@@ -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":"
|
|
1
|
+
{"version":3,"sources":["../../src/containsAll.ts"],"sourcesContent":["export const containsAll = <T>(source: T[], target: T[]) => target.every((i) => source.includes(i))\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,IAAM,cAAc,CAAI,QAAa,WAAgB,OAAO,MAAM,CAAC,MAAM,OAAO,SAAS,CAAC,CAAC;","names":[]}
|
|
@@ -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,
|
|
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":[]}
|
package/dist/node/distinct.js
CHANGED
|
@@ -16,12 +16,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/distinct.ts
|
|
19
21
|
var distinct_exports = {};
|
|
20
22
|
__export(distinct_exports, {
|
|
21
23
|
distinct: () => distinct
|
|
22
24
|
});
|
|
23
25
|
module.exports = __toCommonJS(distinct_exports);
|
|
24
|
-
|
|
26
|
+
var distinct = (value, index, array) => array.indexOf(value) === index;
|
|
25
27
|
// Annotate the CommonJS export names for ESM import in node:
|
|
26
28
|
0 && (module.exports = {
|
|
27
29
|
distinct
|
|
@@ -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":"
|
|
1
|
+
{"version":3,"sources":["../../src/distinct.ts"],"sourcesContent":["export const distinct = <T>(value: T, index: number, array: T[]) => array.indexOf(value) === index\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,IAAM,WAAW,CAAI,OAAU,OAAe,UAAe,MAAM,QAAQ,KAAK,MAAM;","names":[]}
|
package/dist/node/distinct.mjs
CHANGED
|
@@ -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,
|
|
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":[]}
|
package/dist/node/flatten.js
CHANGED
|
@@ -16,13 +16,15 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/flatten.ts
|
|
19
21
|
var flatten_exports = {};
|
|
20
22
|
__export(flatten_exports, {
|
|
21
23
|
flatten: () => flatten
|
|
22
24
|
});
|
|
23
25
|
module.exports = __toCommonJS(flatten_exports);
|
|
24
26
|
var import_exists = require("@xylabs/exists");
|
|
25
|
-
|
|
27
|
+
var flatten = (a, b) => {
|
|
26
28
|
return [].concat(a).concat(b).filter(import_exists.exists);
|
|
27
29
|
};
|
|
28
30
|
// Annotate the CommonJS export names for ESM import in node:
|
package/dist/node/flatten.js.map
CHANGED
|
@@ -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":"
|
|
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;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAuB;AAEhB,IAAM,UAAU,CAAI,GAAwB,MAAgC;AACjF,SAAQ,CAAC,EAAwB,OAAO,CAAC,EAAE,OAAO,CAAC,EAAE,OAAO,oBAAM;AACpE;","names":[]}
|
package/dist/node/flatten.mjs
CHANGED
|
@@ -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,
|
|
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":[]}
|
package/dist/node/index.js
CHANGED
|
@@ -3,6 +3,10 @@ var __defProp = Object.defineProperty;
|
|
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
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
|
+
};
|
|
6
10
|
var __copyProps = (to, from, except, desc) => {
|
|
7
11
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
12
|
for (let key of __getOwnPropNames(from))
|
|
@@ -11,17 +15,32 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
11
15
|
}
|
|
12
16
|
return to;
|
|
13
17
|
};
|
|
14
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/index.ts
|
|
16
21
|
var src_exports = {};
|
|
22
|
+
__export(src_exports, {
|
|
23
|
+
containsAll: () => containsAll,
|
|
24
|
+
distinct: () => distinct,
|
|
25
|
+
flatten: () => flatten
|
|
26
|
+
});
|
|
17
27
|
module.exports = __toCommonJS(src_exports);
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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
|
+
};
|
|
21
40
|
// Annotate the CommonJS export names for ESM import in node:
|
|
22
41
|
0 && (module.exports = {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
42
|
+
containsAll,
|
|
43
|
+
distinct,
|
|
44
|
+
flatten
|
|
26
45
|
});
|
|
27
46
|
//# sourceMappingURL=index.js.map
|
package/dist/node/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export * from './containsAll'\nexport * from './distinct'\nexport * from './flatten'\n"],"mappings":"
|
|
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/node/index.mjs
CHANGED
|
@@ -1,4 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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.mjs.map
|
package/dist/node/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/
|
|
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
|
"main": "dist/node/index.js",
|
|
33
33
|
"module": "dist/node/index.mjs",
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@xylabs/exists": "~2.11.
|
|
35
|
+
"@xylabs/exists": "~2.11.23"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@xylabs/ts-scripts-yarn3": "^3.0.
|
|
39
|
-
"@xylabs/tsconfig": "^3.0.
|
|
38
|
+
"@xylabs/ts-scripts-yarn3": "^3.0.72",
|
|
39
|
+
"@xylabs/tsconfig": "^3.0.72",
|
|
40
40
|
"typescript": "^5.2.2"
|
|
41
41
|
},
|
|
42
42
|
"homepage": "https://xylabs.com",
|
|
@@ -54,5 +54,5 @@
|
|
|
54
54
|
"url": "https://github.com/xylabs/sdk-js.git"
|
|
55
55
|
},
|
|
56
56
|
"sideEffects": false,
|
|
57
|
-
"version": "2.11.
|
|
57
|
+
"version": "2.11.23"
|
|
58
58
|
}
|