@xylabs/set 3.1.13 → 3.3.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/neutral/index.cjs +43 -0
- package/dist/neutral/index.cjs.map +1 -0
- package/dist/neutral/index.d.cts +2 -0
- package/dist/neutral/index.d.cts.map +1 -0
- package/dist/neutral/index.d.mts +2 -0
- package/dist/neutral/index.d.mts.map +1 -0
- package/dist/neutral/index.d.ts +2 -0
- package/dist/neutral/index.d.ts.map +1 -0
- package/dist/neutral/index.js +20 -0
- package/dist/neutral/index.js.map +1 -0
- package/dist/neutral/lib/difference.d.cts +2 -0
- package/dist/neutral/lib/difference.d.cts.map +1 -0
- package/dist/neutral/lib/difference.d.mts +2 -0
- package/dist/neutral/lib/difference.d.mts.map +1 -0
- package/dist/neutral/lib/difference.d.ts +2 -0
- package/dist/neutral/lib/difference.d.ts.map +1 -0
- package/dist/neutral/lib/index.d.cts +4 -0
- package/dist/neutral/lib/index.d.cts.map +1 -0
- package/dist/neutral/lib/index.d.mts +4 -0
- package/dist/neutral/lib/index.d.mts.map +1 -0
- package/dist/neutral/lib/index.d.ts +4 -0
- package/dist/neutral/lib/index.d.ts.map +1 -0
- package/dist/neutral/lib/intersection.d.cts +2 -0
- package/dist/neutral/lib/intersection.d.cts.map +1 -0
- package/dist/neutral/lib/intersection.d.mts +2 -0
- package/dist/neutral/lib/intersection.d.mts.map +1 -0
- package/dist/neutral/lib/intersection.d.ts +2 -0
- package/dist/neutral/lib/intersection.d.ts.map +1 -0
- package/dist/neutral/lib/union.d.cts +2 -0
- package/dist/neutral/lib/union.d.cts.map +1 -0
- package/dist/neutral/lib/union.d.mts +2 -0
- package/dist/neutral/lib/union.d.mts.map +1 -0
- package/dist/neutral/lib/union.d.ts +2 -0
- package/dist/neutral/lib/union.d.ts.map +1 -0
- package/package.json +10 -10
|
@@ -0,0 +1,43 @@
|
|
|
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/index.ts
|
|
21
|
+
var src_exports = {};
|
|
22
|
+
__export(src_exports, {
|
|
23
|
+
difference: () => difference,
|
|
24
|
+
intersection: () => intersection,
|
|
25
|
+
union: () => union
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(src_exports);
|
|
28
|
+
|
|
29
|
+
// src/lib/difference.ts
|
|
30
|
+
var difference = (a, b) => {
|
|
31
|
+
return new Set([...a].filter((x) => !b.has(x)));
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
// src/lib/intersection.ts
|
|
35
|
+
var intersection = (a, b) => {
|
|
36
|
+
return new Set([...a].filter((x) => b.has(x)));
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
// src/lib/union.ts
|
|
40
|
+
var union = (a, b) => {
|
|
41
|
+
return /* @__PURE__ */ new Set([...a, ...b]);
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts","../../src/lib/difference.ts","../../src/lib/intersection.ts","../../src/lib/union.ts"],"sourcesContent":["export * from './lib'\n","export const difference = <TKey>(a: Set<TKey>, b: Set<TKey>): Set<TKey> => {\n return new Set([...a].filter((x) => !b.has(x)))\n}\n","export const intersection = <TKey>(a: Set<TKey>, b: Set<TKey>): Set<TKey> => {\n return new Set([...a].filter((x) => b.has(x)))\n}\n","export const union = <TKey>(a: Set<TKey>, b: Set<TKey>): Set<TKey> => {\n return new Set([...a, ...b])\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAO,IAAM,aAAa,CAAO,GAAc,MAA4B;AACzE,SAAO,IAAI,IAAI,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;AAChD;;;ACFO,IAAM,eAAe,CAAO,GAAc,MAA4B;AAC3E,SAAO,IAAI,IAAI,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC;AAC/C;;;ACFO,IAAM,QAAQ,CAAO,GAAc,MAA4B;AACpE,SAAO,oBAAI,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC;AAC7B;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// src/lib/difference.ts
|
|
2
|
+
var difference = (a, b) => {
|
|
3
|
+
return new Set([...a].filter((x) => !b.has(x)));
|
|
4
|
+
};
|
|
5
|
+
|
|
6
|
+
// src/lib/intersection.ts
|
|
7
|
+
var intersection = (a, b) => {
|
|
8
|
+
return new Set([...a].filter((x) => b.has(x)));
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
// src/lib/union.ts
|
|
12
|
+
var union = (a, b) => {
|
|
13
|
+
return /* @__PURE__ */ new Set([...a, ...b]);
|
|
14
|
+
};
|
|
15
|
+
export {
|
|
16
|
+
difference,
|
|
17
|
+
intersection,
|
|
18
|
+
union
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/difference.ts","../../src/lib/intersection.ts","../../src/lib/union.ts"],"sourcesContent":["export const difference = <TKey>(a: Set<TKey>, b: Set<TKey>): Set<TKey> => {\n return new Set([...a].filter((x) => !b.has(x)))\n}\n","export const intersection = <TKey>(a: Set<TKey>, b: Set<TKey>): Set<TKey> => {\n return new Set([...a].filter((x) => b.has(x)))\n}\n","export const union = <TKey>(a: Set<TKey>, b: Set<TKey>): Set<TKey> => {\n return new Set([...a, ...b])\n}\n"],"mappings":";AAAO,IAAM,aAAa,CAAO,GAAc,MAA4B;AACzE,SAAO,IAAI,IAAI,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;AAChD;;;ACFO,IAAM,eAAe,CAAO,GAAc,MAA4B;AAC3E,SAAO,IAAI,IAAI,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC;AAC/C;;;ACFO,IAAM,QAAQ,CAAO,GAAc,MAA4B;AACpE,SAAO,oBAAI,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC;AAC7B;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"difference.d.ts","sourceRoot":"","sources":["../../../src/lib/difference.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,YAAa,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAG,IAAI,IAAI,CAErE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"difference.d.ts","sourceRoot":"","sources":["../../../src/lib/difference.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,YAAa,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAG,IAAI,IAAI,CAErE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"difference.d.ts","sourceRoot":"","sources":["../../../src/lib/difference.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,YAAa,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAG,IAAI,IAAI,CAErE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,SAAS,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,SAAS,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,SAAS,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intersection.d.ts","sourceRoot":"","sources":["../../../src/lib/intersection.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,YAAa,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAG,IAAI,IAAI,CAEvE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intersection.d.ts","sourceRoot":"","sources":["../../../src/lib/intersection.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,YAAa,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAG,IAAI,IAAI,CAEvE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intersection.d.ts","sourceRoot":"","sources":["../../../src/lib/intersection.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,YAAa,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAG,IAAI,IAAI,CAEvE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"union.d.ts","sourceRoot":"","sources":["../../../src/lib/union.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,YAAa,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAG,IAAI,IAAI,CAEhE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"union.d.ts","sourceRoot":"","sources":["../../../src/lib/union.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,YAAa,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAG,IAAI,IAAI,CAEhE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"union.d.ts","sourceRoot":"","sources":["../../../src/lib/union.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,YAAa,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAG,IAAI,IAAI,CAEhE,CAAA"}
|
package/package.json
CHANGED
|
@@ -17,19 +17,19 @@
|
|
|
17
17
|
"exports": {
|
|
18
18
|
".": {
|
|
19
19
|
"require": {
|
|
20
|
-
"types": "./dist/
|
|
21
|
-
"default": "./dist/
|
|
20
|
+
"types": "./dist/neutral/index.d.cts",
|
|
21
|
+
"default": "./dist/neutral/index.cjs"
|
|
22
22
|
},
|
|
23
23
|
"import": {
|
|
24
|
-
"types": "./dist/
|
|
25
|
-
"default": "./dist/
|
|
24
|
+
"types": "./dist/neutral/index.d.mts",
|
|
25
|
+
"default": "./dist/neutral/index.js"
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"./package.json": "./package.json"
|
|
29
29
|
},
|
|
30
|
-
"main": "./dist/
|
|
31
|
-
"types": "./dist/
|
|
32
|
-
"module": "./dist/
|
|
30
|
+
"main": "./dist/neutral/index.cjs",
|
|
31
|
+
"types": "./dist/neutral/index.d.ts",
|
|
32
|
+
"module": "./dist/neutral/index.js",
|
|
33
33
|
"homepage": "https://xylabs.com",
|
|
34
34
|
"keywords": [
|
|
35
35
|
"set",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"esm"
|
|
40
40
|
],
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@xylabs/ts-scripts-yarn3": "^3.
|
|
43
|
-
"@xylabs/tsconfig": "^3.
|
|
42
|
+
"@xylabs/ts-scripts-yarn3": "^3.10.0",
|
|
43
|
+
"@xylabs/tsconfig": "^3.10.0",
|
|
44
44
|
"typescript": "^5.4.5"
|
|
45
45
|
},
|
|
46
46
|
"engines": {
|
|
@@ -54,6 +54,6 @@
|
|
|
54
54
|
"url": "https://github.com/xylabs/sdk-js.git"
|
|
55
55
|
},
|
|
56
56
|
"sideEffects": false,
|
|
57
|
-
"version": "3.
|
|
57
|
+
"version": "3.3.0",
|
|
58
58
|
"type": "module"
|
|
59
59
|
}
|