@xylabs/set 2.12.8 → 2.12.10

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.
@@ -3,6 +3,10 @@ var __defProp = Object.defineProperty;
3
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
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
+ };
6
10
  var __copyProps = (to, from, except, desc) => {
7
11
  if (from && typeof from === "object" || typeof from === "function") {
8
12
  for (let key of __getOwnPropNames(from))
@@ -11,9 +15,29 @@ var __copyProps = (to, from, except, desc) => {
11
15
  }
12
16
  return to;
13
17
  };
14
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.ts
16
21
  var src_exports = {};
22
+ __export(src_exports, {
23
+ difference: () => difference,
24
+ intersection: () => intersection,
25
+ union: () => union
26
+ });
17
27
  module.exports = __toCommonJS(src_exports);
18
- __reExport(src_exports, require("./lib"), module.exports);
28
+
29
+ // src/lib/difference.ts
30
+ var difference = (a, b) => {
31
+ return new Set(Array.from(a).filter((x) => !b.has(x)));
32
+ };
33
+
34
+ // src/lib/intersection.ts
35
+ var intersection = (a, b) => {
36
+ return new Set(Array.from(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
+ };
19
43
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export * from './lib'\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,wBAAc,kBAAd;","names":[]}
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(Array.from(a).filter((x) => !b.has(x)))\n}\n","export const intersection = <TKey>(a: Set<TKey>, b: Set<TKey>): Set<TKey> => {\n return new Set(Array.from(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,MAAM,KAAK,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;AACvD;;;ACFO,IAAM,eAAe,CAAO,GAAc,MAA4B;AAC3E,SAAO,IAAI,IAAI,MAAM,KAAK,CAAC,EAAE,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC;AACtD;;;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"}
@@ -16,12 +16,14 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/lib/difference.ts
19
21
  var difference_exports = {};
20
22
  __export(difference_exports, {
21
23
  difference: () => difference
22
24
  });
23
25
  module.exports = __toCommonJS(difference_exports);
24
- const difference = (a, b) => {
26
+ var difference = (a, b) => {
25
27
  return new Set(Array.from(a).filter((x) => !b.has(x)));
26
28
  };
27
29
  //# sourceMappingURL=difference.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/lib/difference.ts"],"sourcesContent":["export const difference = <TKey>(a: Set<TKey>, b: Set<TKey>): Set<TKey> => {\n return new Set(Array.from(a).filter((x) => !b.has(x)))\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,aAAa,CAAO,GAAc,MAA4B;AACzE,SAAO,IAAI,IAAI,MAAM,KAAK,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;AACvD;","names":[]}
1
+ {"version":3,"sources":["../../../src/lib/difference.ts"],"sourcesContent":["export const difference = <TKey>(a: Set<TKey>, b: Set<TKey>): Set<TKey> => {\n return new Set(Array.from(a).filter((x) => !b.has(x)))\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,IAAM,aAAa,CAAO,GAAc,MAA4B;AACzE,SAAO,IAAI,IAAI,MAAM,KAAK,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;AACvD;","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,iDAEtB,CAAA"}
@@ -3,6 +3,10 @@ var __defProp = Object.defineProperty;
3
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
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
+ };
6
10
  var __copyProps = (to, from, except, desc) => {
7
11
  if (from && typeof from === "object" || typeof from === "function") {
8
12
  for (let key of __getOwnPropNames(from))
@@ -11,11 +15,29 @@ var __copyProps = (to, from, except, desc) => {
11
15
  }
12
16
  return to;
13
17
  };
14
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/lib/index.ts
16
21
  var lib_exports = {};
22
+ __export(lib_exports, {
23
+ difference: () => difference,
24
+ intersection: () => intersection,
25
+ union: () => union
26
+ });
17
27
  module.exports = __toCommonJS(lib_exports);
18
- __reExport(lib_exports, require("./difference"), module.exports);
19
- __reExport(lib_exports, require("./intersection"), module.exports);
20
- __reExport(lib_exports, require("./union"), module.exports);
28
+
29
+ // src/lib/difference.ts
30
+ var difference = (a, b) => {
31
+ return new Set(Array.from(a).filter((x) => !b.has(x)));
32
+ };
33
+
34
+ // src/lib/intersection.ts
35
+ var intersection = (a, b) => {
36
+ return new Set(Array.from(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
+ };
21
43
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/lib/index.ts"],"sourcesContent":["export * from './difference'\nexport * from './intersection'\nexport * from './union'\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,wBAAc,yBAAd;AACA,wBAAc,2BADd;AAEA,wBAAc,oBAFd;","names":[]}
1
+ {"version":3,"sources":["../../../src/lib/index.ts","../../../src/lib/difference.ts","../../../src/lib/intersection.ts","../../../src/lib/union.ts"],"sourcesContent":["export * from './difference'\nexport * from './intersection'\nexport * from './union'\n","export const difference = <TKey>(a: Set<TKey>, b: Set<TKey>): Set<TKey> => {\n return new Set(Array.from(a).filter((x) => !b.has(x)))\n}\n","export const intersection = <TKey>(a: Set<TKey>, b: Set<TKey>): Set<TKey> => {\n return new Set(Array.from(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,MAAM,KAAK,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;AACvD;;;ACFO,IAAM,eAAe,CAAO,GAAc,MAA4B;AAC3E,SAAO,IAAI,IAAI,MAAM,KAAK,CAAC,EAAE,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC;AACtD;;;ACFO,IAAM,QAAQ,CAAO,GAAc,MAA4B;AACpE,SAAO,oBAAI,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC;AAC7B;","names":[]}
@@ -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"}
@@ -16,12 +16,14 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/lib/intersection.ts
19
21
  var intersection_exports = {};
20
22
  __export(intersection_exports, {
21
23
  intersection: () => intersection
22
24
  });
23
25
  module.exports = __toCommonJS(intersection_exports);
24
- const intersection = (a, b) => {
26
+ var intersection = (a, b) => {
25
27
  return new Set(Array.from(a).filter((x) => b.has(x)));
26
28
  };
27
29
  //# sourceMappingURL=intersection.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/lib/intersection.ts"],"sourcesContent":["export const intersection = <TKey>(a: Set<TKey>, b: Set<TKey>): Set<TKey> => {\n return new Set(Array.from(a).filter((x) => b.has(x)))\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,eAAe,CAAO,GAAc,MAA4B;AAC3E,SAAO,IAAI,IAAI,MAAM,KAAK,CAAC,EAAE,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC;AACtD;","names":[]}
1
+ {"version":3,"sources":["../../../src/lib/intersection.ts"],"sourcesContent":["export const intersection = <TKey>(a: Set<TKey>, b: Set<TKey>): Set<TKey> => {\n return new Set(Array.from(a).filter((x) => b.has(x)))\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,IAAM,eAAe,CAAO,GAAc,MAA4B;AAC3E,SAAO,IAAI,IAAI,MAAM,KAAK,CAAC,EAAE,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC;AACtD;","names":[]}
@@ -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,iDAExB,CAAA"}
@@ -16,12 +16,14 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/lib/union.ts
19
21
  var union_exports = {};
20
22
  __export(union_exports, {
21
23
  union: () => union
22
24
  });
23
25
  module.exports = __toCommonJS(union_exports);
24
- const union = (a, b) => {
26
+ var union = (a, b) => {
25
27
  return /* @__PURE__ */ new Set([...a, ...b]);
26
28
  };
27
29
  //# sourceMappingURL=union.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/lib/union.ts"],"sourcesContent":["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;AAAO,MAAM,QAAQ,CAAO,GAAc,MAA4B;AACpE,SAAO,oBAAI,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC;AAC7B;","names":[]}
1
+ {"version":3,"sources":["../../../src/lib/union.ts"],"sourcesContent":["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;AAAO,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 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,iDAEjB,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 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,iDAEtB,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,iDAExB,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,iDAEjB,CAAA"}
package/package.json CHANGED
@@ -18,7 +18,7 @@
18
18
  "exports": {
19
19
  ".": {
20
20
  "require": {
21
- "types": "./dist/node/index.d.ts",
21
+ "types": "./dist/node/index.d.cts",
22
22
  "default": "./dist/node/index.cjs"
23
23
  },
24
24
  "import": {
@@ -42,8 +42,8 @@
42
42
  "esm"
43
43
  ],
44
44
  "devDependencies": {
45
- "@xylabs/ts-scripts-yarn3": "^3.0.74",
46
- "@xylabs/tsconfig": "^3.0.74",
45
+ "@xylabs/ts-scripts-yarn3": "^3.0.76",
46
+ "@xylabs/tsconfig": "^3.0.76",
47
47
  "typescript": "^5.2.2"
48
48
  },
49
49
  "publishConfig": {
@@ -54,7 +54,7 @@
54
54
  "url": "https://github.com/xylabs/sdk-js.git"
55
55
  },
56
56
  "sideEffects": false,
57
- "version": "2.12.8",
57
+ "version": "2.12.10",
58
58
  "packageManager": "yarn@3.3.1",
59
59
  "type": "module"
60
60
  }