@xylabs/array 2.11.18 → 2.11.20
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 +25 -0
- package/dist/browser/containsAll.cjs.map +1 -0
- package/dist/browser/distinct.cjs +25 -0
- package/dist/browser/distinct.cjs.map +1 -0
- package/dist/browser/flatten.cjs +28 -0
- package/dist/browser/flatten.cjs.map +1 -0
- package/dist/browser/index.cjs +21 -0
- package/dist/browser/index.cjs.map +1 -0
- package/package.json +4 -4
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
var containsAll_exports = {};
|
|
20
|
+
__export(containsAll_exports, {
|
|
21
|
+
containsAll: () => containsAll
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(containsAll_exports);
|
|
24
|
+
const containsAll = (source, target) => target.every((i) => source.includes(i));
|
|
25
|
+
//# sourceMappingURL=containsAll.cjs.map
|
|
@@ -0,0 +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":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,cAAc,CAAI,QAAa,WAAgB,OAAO,MAAM,CAAC,MAAM,OAAO,SAAS,CAAC,CAAC;","names":[]}
|
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
var distinct_exports = {};
|
|
20
|
+
__export(distinct_exports, {
|
|
21
|
+
distinct: () => distinct
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(distinct_exports);
|
|
24
|
+
const distinct = (value, index, array) => array.indexOf(value) === index;
|
|
25
|
+
//# sourceMappingURL=distinct.cjs.map
|
|
@@ -0,0 +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":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,WAAW,CAAI,OAAU,OAAe,UAAe,MAAM,QAAQ,KAAK,MAAM;","names":[]}
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
var flatten_exports = {};
|
|
20
|
+
__export(flatten_exports, {
|
|
21
|
+
flatten: () => flatten
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(flatten_exports);
|
|
24
|
+
var import_exists = require("@xylabs/exists");
|
|
25
|
+
const flatten = (a, b) => {
|
|
26
|
+
return [].concat(a).concat(b).filter(import_exists.exists);
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=flatten.cjs.map
|
|
@@ -0,0 +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;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":[]}
|
|
@@ -0,0 +1,21 @@
|
|
|
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 __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
16
|
+
var src_exports = {};
|
|
17
|
+
module.exports = __toCommonJS(src_exports);
|
|
18
|
+
__reExport(src_exports, require("./containsAll"), module.exports);
|
|
19
|
+
__reExport(src_exports, require("./distinct"), module.exports);
|
|
20
|
+
__reExport(src_exports, require("./flatten"), module.exports);
|
|
21
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
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/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.20"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@xylabs/ts-scripts-yarn3": "^3.0.
|
|
39
|
-
"@xylabs/tsconfig": "^3.0.
|
|
38
|
+
"@xylabs/ts-scripts-yarn3": "^3.0.68",
|
|
39
|
+
"@xylabs/tsconfig": "^3.0.68",
|
|
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.20"
|
|
58
58
|
}
|