@xylabs/array 2.10.0 → 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.
- package/dist/index.d.mts +7 -3
- package/dist/index.d.ts +7 -3
- package/package.json +2 -2
- package/tsup.config.ts +5 -3
- package/dist/containsAll.d.mts +0 -3
- package/dist/containsAll.d.ts +0 -3
- package/dist/containsAll.js +0 -31
- package/dist/containsAll.js.map +0 -1
- package/dist/containsAll.mjs +0 -6
- package/dist/containsAll.mjs.map +0 -1
- package/dist/distinct.d.mts +0 -3
- package/dist/distinct.d.ts +0 -3
- package/dist/distinct.js +0 -31
- package/dist/distinct.js.map +0 -1
- package/dist/distinct.mjs +0 -6
- package/dist/distinct.mjs.map +0 -1
- package/dist/flatten.d.mts +0 -3
- package/dist/flatten.d.ts +0 -3
- package/dist/flatten.js +0 -34
- package/dist/flatten.js.map +0 -1
- package/dist/flatten.mjs +0 -9
- package/dist/flatten.mjs.map +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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/package.json
CHANGED
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"package-recompile": "tsup && publint"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@xylabs/exists": "~2.10.
|
|
48
|
+
"@xylabs/exists": "~2.10.1"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@xylabs/ts-scripts-yarn3": "^2.19.5",
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"url": "https://github.com/xylabs/sdk-js.git"
|
|
69
69
|
},
|
|
70
70
|
"sideEffects": false,
|
|
71
|
-
"version": "2.10.
|
|
71
|
+
"version": "2.10.1"
|
|
72
72
|
}
|
package/tsup.config.ts
CHANGED
|
@@ -5,10 +5,12 @@ export default defineConfig({
|
|
|
5
5
|
bundle: true,
|
|
6
6
|
cjsInterop: true,
|
|
7
7
|
clean: true,
|
|
8
|
-
dts:
|
|
9
|
-
|
|
8
|
+
dts: {
|
|
9
|
+
entry: ['src/index.ts'],
|
|
10
|
+
},
|
|
11
|
+
entry: ['src/index.ts'],
|
|
10
12
|
format: ['cjs', 'esm'],
|
|
11
13
|
sourcemap: true,
|
|
12
14
|
splitting: false,
|
|
13
|
-
tsconfig: 'tsconfig.json',
|
|
15
|
+
tsconfig: 'tsconfig.build.json',
|
|
14
16
|
})
|
package/dist/containsAll.d.mts
DELETED
package/dist/containsAll.d.ts
DELETED
package/dist/containsAll.js
DELETED
|
@@ -1,31 +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/containsAll.ts
|
|
21
|
-
var containsAll_exports = {};
|
|
22
|
-
__export(containsAll_exports, {
|
|
23
|
-
containsAll: () => containsAll
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(containsAll_exports);
|
|
26
|
-
var containsAll = (source, target) => target.every((i) => source.includes(i));
|
|
27
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
28
|
-
0 && (module.exports = {
|
|
29
|
-
containsAll
|
|
30
|
-
});
|
|
31
|
-
//# sourceMappingURL=containsAll.js.map
|
package/dist/containsAll.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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":[]}
|
package/dist/containsAll.mjs
DELETED
package/dist/containsAll.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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/distinct.d.mts
DELETED
package/dist/distinct.d.ts
DELETED
package/dist/distinct.js
DELETED
|
@@ -1,31 +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/distinct.ts
|
|
21
|
-
var distinct_exports = {};
|
|
22
|
-
__export(distinct_exports, {
|
|
23
|
-
distinct: () => distinct
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(distinct_exports);
|
|
26
|
-
var distinct = (value, index, array) => array.indexOf(value) === index;
|
|
27
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
28
|
-
0 && (module.exports = {
|
|
29
|
-
distinct
|
|
30
|
-
});
|
|
31
|
-
//# sourceMappingURL=distinct.js.map
|
package/dist/distinct.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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/distinct.mjs
DELETED
package/dist/distinct.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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/flatten.d.mts
DELETED
package/dist/flatten.d.ts
DELETED
package/dist/flatten.js
DELETED
|
@@ -1,34 +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/flatten.ts
|
|
21
|
-
var flatten_exports = {};
|
|
22
|
-
__export(flatten_exports, {
|
|
23
|
-
flatten: () => flatten
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(flatten_exports);
|
|
26
|
-
var import_exists = require("@xylabs/exists");
|
|
27
|
-
var flatten = (a, b) => {
|
|
28
|
-
return [].concat(a).concat(b).filter(import_exists.exists);
|
|
29
|
-
};
|
|
30
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
31
|
-
0 && (module.exports = {
|
|
32
|
-
flatten
|
|
33
|
-
});
|
|
34
|
-
//# sourceMappingURL=flatten.js.map
|
package/dist/flatten.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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/flatten.mjs
DELETED
package/dist/flatten.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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":[]}
|