@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.
Files changed (35) hide show
  1. package/dist/neutral/index.cjs +43 -0
  2. package/dist/neutral/index.cjs.map +1 -0
  3. package/dist/neutral/index.d.cts +2 -0
  4. package/dist/neutral/index.d.cts.map +1 -0
  5. package/dist/neutral/index.d.mts +2 -0
  6. package/dist/neutral/index.d.mts.map +1 -0
  7. package/dist/neutral/index.d.ts +2 -0
  8. package/dist/neutral/index.d.ts.map +1 -0
  9. package/dist/neutral/index.js +20 -0
  10. package/dist/neutral/index.js.map +1 -0
  11. package/dist/neutral/lib/difference.d.cts +2 -0
  12. package/dist/neutral/lib/difference.d.cts.map +1 -0
  13. package/dist/neutral/lib/difference.d.mts +2 -0
  14. package/dist/neutral/lib/difference.d.mts.map +1 -0
  15. package/dist/neutral/lib/difference.d.ts +2 -0
  16. package/dist/neutral/lib/difference.d.ts.map +1 -0
  17. package/dist/neutral/lib/index.d.cts +4 -0
  18. package/dist/neutral/lib/index.d.cts.map +1 -0
  19. package/dist/neutral/lib/index.d.mts +4 -0
  20. package/dist/neutral/lib/index.d.mts.map +1 -0
  21. package/dist/neutral/lib/index.d.ts +4 -0
  22. package/dist/neutral/lib/index.d.ts.map +1 -0
  23. package/dist/neutral/lib/intersection.d.cts +2 -0
  24. package/dist/neutral/lib/intersection.d.cts.map +1 -0
  25. package/dist/neutral/lib/intersection.d.mts +2 -0
  26. package/dist/neutral/lib/intersection.d.mts.map +1 -0
  27. package/dist/neutral/lib/intersection.d.ts +2 -0
  28. package/dist/neutral/lib/intersection.d.ts.map +1 -0
  29. package/dist/neutral/lib/union.d.cts +2 -0
  30. package/dist/neutral/lib/union.d.cts.map +1 -0
  31. package/dist/neutral/lib/union.d.mts +2 -0
  32. package/dist/neutral/lib/union.d.mts.map +1 -0
  33. package/dist/neutral/lib/union.d.ts +2 -0
  34. package/dist/neutral/lib/union.d.ts.map +1 -0
  35. 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,2 @@
1
+ export * from './lib';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAA"}
@@ -0,0 +1,2 @@
1
+ export * from './lib';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAA"}
@@ -0,0 +1,2 @@
1
+ export * from './lib';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -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,2 @@
1
+ export declare const difference: <TKey>(a: Set<TKey>, b: Set<TKey>) => Set<TKey>;
2
+ //# sourceMappingURL=difference.d.ts.map
@@ -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,2 @@
1
+ export declare const difference: <TKey>(a: Set<TKey>, b: Set<TKey>) => Set<TKey>;
2
+ //# sourceMappingURL=difference.d.ts.map
@@ -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,2 @@
1
+ export declare const difference: <TKey>(a: Set<TKey>, b: Set<TKey>) => Set<TKey>;
2
+ //# sourceMappingURL=difference.d.ts.map
@@ -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,4 @@
1
+ export * from './difference';
2
+ export * from './intersection';
3
+ export * from './union';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -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,4 @@
1
+ export * from './difference';
2
+ export * from './intersection';
3
+ export * from './union';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -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,4 @@
1
+ export * from './difference';
2
+ export * from './intersection';
3
+ export * from './union';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -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,2 @@
1
+ export declare const intersection: <TKey>(a: Set<TKey>, b: Set<TKey>) => Set<TKey>;
2
+ //# sourceMappingURL=intersection.d.ts.map
@@ -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,2 @@
1
+ export declare const intersection: <TKey>(a: Set<TKey>, b: Set<TKey>) => Set<TKey>;
2
+ //# sourceMappingURL=intersection.d.ts.map
@@ -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,2 @@
1
+ export declare const intersection: <TKey>(a: Set<TKey>, b: Set<TKey>) => Set<TKey>;
2
+ //# sourceMappingURL=intersection.d.ts.map
@@ -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,2 @@
1
+ export declare const union: <TKey>(a: Set<TKey>, b: Set<TKey>) => Set<TKey>;
2
+ //# sourceMappingURL=union.d.ts.map
@@ -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,2 @@
1
+ export declare const union: <TKey>(a: Set<TKey>, b: Set<TKey>) => Set<TKey>;
2
+ //# sourceMappingURL=union.d.ts.map
@@ -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,2 @@
1
+ export declare const union: <TKey>(a: Set<TKey>, b: Set<TKey>) => Set<TKey>;
2
+ //# sourceMappingURL=union.d.ts.map
@@ -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/node/index.d.cts",
21
- "default": "./dist/node/index.cjs"
20
+ "types": "./dist/neutral/index.d.cts",
21
+ "default": "./dist/neutral/index.cjs"
22
22
  },
23
23
  "import": {
24
- "types": "./dist/node/index.d.mts",
25
- "default": "./dist/node/index.js"
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/node/index.cjs",
31
- "types": "./dist/node/index.d.ts",
32
- "module": "./dist/node/index.js",
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.9.1",
43
- "@xylabs/tsconfig": "^3.9.1",
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.1.13",
57
+ "version": "3.3.0",
58
58
  "type": "module"
59
59
  }