@xylabs/array 2.10.17 → 2.11.0
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/containsAll.d.ts +2 -0
- package/dist/containsAll.d.ts.map +1 -0
- package/dist/distinct.d.ts +2 -0
- package/dist/distinct.d.ts.map +1 -0
- package/dist/flatten.d.ts +2 -0
- package/dist/flatten.d.ts.map +1 -0
- package/dist/index.d.mts +4 -7
- package/dist/index.d.mts.map +1 -0
- package/dist/index.d.ts +4 -7
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +11 -41
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -14
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -10
- package/tsup.config.ts +0 -16
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"containsAll.d.ts","sourceRoot":"","sources":["../src/containsAll.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,0CAA2E,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"distinct.d.ts","sourceRoot":"","sources":["../src/distinct.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,uBAAwB,MAAM,wBAA+C,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flatten.d.ts","sourceRoot":"","sources":["../src/flatten.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,oFAEnB,CAAA"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
declare const flatten: <T>(a?: T | ConcatArray<T> | undefined, b?: T | ConcatArray<T> | undefined) => T[];
|
|
6
|
-
|
|
7
|
-
export { containsAll, distinct, flatten };
|
|
1
|
+
export * from './containsAll';
|
|
2
|
+
export * from './distinct';
|
|
3
|
+
export * from './flatten';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
declare const flatten: <T>(a?: T | ConcatArray<T> | undefined, b?: T | ConcatArray<T> | undefined) => T[];
|
|
6
|
-
|
|
7
|
-
export { containsAll, distinct, flatten };
|
|
1
|
+
export * from './containsAll';
|
|
2
|
+
export * from './distinct';
|
|
3
|
+
export * from './flatten';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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/dist/index.js
CHANGED
|
@@ -1,46 +1,16 @@
|
|
|
1
|
-
|
|
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);
|
|
1
|
+
'use strict';
|
|
19
2
|
|
|
20
|
-
|
|
21
|
-
var src_exports = {};
|
|
22
|
-
__export(src_exports, {
|
|
23
|
-
containsAll: () => containsAll,
|
|
24
|
-
distinct: () => distinct,
|
|
25
|
-
flatten: () => flatten
|
|
26
|
-
});
|
|
27
|
-
module.exports = __toCommonJS(src_exports);
|
|
3
|
+
var exists = require('@xylabs/exists');
|
|
28
4
|
|
|
29
|
-
|
|
30
|
-
var containsAll = (source, target) => target.every((i) => source.includes(i));
|
|
5
|
+
const containsAll = (source, target) => target.every((i) => source.includes(i));
|
|
31
6
|
|
|
32
|
-
|
|
33
|
-
var distinct = (value, index, array) => array.indexOf(value) === index;
|
|
7
|
+
const distinct = (value, index, array) => array.indexOf(value) === index;
|
|
34
8
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
var flatten = (a, b) => {
|
|
38
|
-
return [].concat(a).concat(b).filter(import_exists.exists);
|
|
9
|
+
const flatten = (a, b) => {
|
|
10
|
+
return [].concat(a).concat(b).filter(exists.exists);
|
|
39
11
|
};
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
});
|
|
46
|
-
//# sourceMappingURL=index.js.map
|
|
12
|
+
|
|
13
|
+
exports.containsAll = containsAll;
|
|
14
|
+
exports.distinct = distinct;
|
|
15
|
+
exports.flatten = flatten;
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/containsAll.ts","../src/distinct.ts"],"sourcesContent":[null,null],"names":[],"mappings":";;;;AAAO,MAAA,WAAiB,GAAA,CAAA,MAAA,EAAA,MAAA,KAAA,MAAA,CAAA,KAAA,CAAA,CAAA,CAAA,KAAA,MAAA,CAA2E,QAAA,CAAA,CAAA,CAAA;;ACAnG,MAAA,QAAa,GAAA,CAAA,KAAgC,EAAA,KAAA,EAAA,KAAA,KAAA,KAAA,CAAA;;;;;;;;;;"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,17 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
var containsAll = (source, target) => target.every((i) => source.includes(i));
|
|
1
|
+
import { exists } from '@xylabs/exists';
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
var distinct = (value, index, array) => array.indexOf(value) === index;
|
|
3
|
+
const containsAll = (source, target) => target.every((i) => source.includes(i));
|
|
6
4
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
};
|
|
12
|
-
export {
|
|
13
|
-
containsAll,
|
|
14
|
-
distinct,
|
|
15
|
-
flatten
|
|
5
|
+
const distinct = (value, index, array) => array.indexOf(value) === index;
|
|
6
|
+
|
|
7
|
+
const flatten = (a, b) => {
|
|
8
|
+
return [].concat(a).concat(b).filter(exists);
|
|
16
9
|
};
|
|
17
|
-
|
|
10
|
+
|
|
11
|
+
export { containsAll, distinct, flatten };
|
|
12
|
+
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/containsAll.ts","../src/distinct.ts"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../src/containsAll.ts","../src/distinct.ts"],"sourcesContent":[null,null],"names":[],"mappings":";;AAAO,MAAA,WAAiB,GAAA,CAAA,MAAA,EAAA,MAAA,KAAA,MAAA,CAAA,KAAA,CAAA,CAAA,CAAA,KAAA,MAAA,CAA2E,QAAA,CAAA,CAAA,CAAA;;ACAnG,MAAA,QAAa,GAAA,CAAA,KAAgC,EAAA,KAAA,EAAA,KAAA,KAAA,KAAA,CAAA;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -40,18 +40,12 @@
|
|
|
40
40
|
},
|
|
41
41
|
"main": "dist/index.js",
|
|
42
42
|
"module": "dist/index.mjs",
|
|
43
|
-
"scripts": {
|
|
44
|
-
"package-compile": "tsup && publint",
|
|
45
|
-
"package-recompile": "tsup && publint"
|
|
46
|
-
},
|
|
47
43
|
"dependencies": {
|
|
48
|
-
"@xylabs/exists": "~2.
|
|
44
|
+
"@xylabs/exists": "~2.11.0"
|
|
49
45
|
},
|
|
50
46
|
"devDependencies": {
|
|
51
|
-
"@xylabs/ts-scripts-yarn3": "^
|
|
52
|
-
"@xylabs/tsconfig": "^
|
|
53
|
-
"publint": "^0.2.2",
|
|
54
|
-
"tsup": "^7.2.0"
|
|
47
|
+
"@xylabs/ts-scripts-yarn3": "^3.0.0-rc.15",
|
|
48
|
+
"@xylabs/tsconfig": "^3.0.0-rc.15"
|
|
55
49
|
},
|
|
56
50
|
"homepage": "https://xylabs.com",
|
|
57
51
|
"keywords": [
|
|
@@ -68,5 +62,5 @@
|
|
|
68
62
|
"url": "https://github.com/xylabs/sdk-js.git"
|
|
69
63
|
},
|
|
70
64
|
"sideEffects": false,
|
|
71
|
-
"version": "2.
|
|
65
|
+
"version": "2.11.0"
|
|
72
66
|
}
|
package/tsup.config.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
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: false,
|
|
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
|
-
})
|