@xylabs/exists 3.6.12 → 4.0.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.
@@ -1,2 +1,3 @@
1
- export declare const exists: <T>(x?: T | null) => x is T;
2
- //# sourceMappingURL=index.d.ts.map
1
+ declare const exists: <T>(x?: T | null) => x is T;
2
+
3
+ export { exists };
package/package.json CHANGED
@@ -13,18 +13,11 @@
13
13
  "description": "Base functionality used throughout XY Labs TypeScript/JavaScript libraries",
14
14
  "exports": {
15
15
  ".": {
16
- "require": {
17
- "types": "./dist/neutral/index.d.cts",
18
- "default": "./dist/neutral/index.cjs"
19
- },
20
- "import": {
21
- "types": "./dist/neutral/index.d.ts",
22
- "default": "./dist/neutral/index.mjs"
23
- }
16
+ "types": "./dist/neutral/index.d.ts",
17
+ "default": "./dist/neutral/index.mjs"
24
18
  },
25
19
  "./package.json": "./package.json"
26
20
  },
27
- "main": "./dist/neutral/index.cjs",
28
21
  "types": "./dist/neutral/index.d.ts",
29
22
  "module": "./dist/neutral/index.mjs",
30
23
  "homepage": "https://xylabs.com",
@@ -36,8 +29,8 @@
36
29
  "esm"
37
30
  ],
38
31
  "devDependencies": {
39
- "@xylabs/ts-scripts-yarn3": "^3.15.14",
40
- "@xylabs/tsconfig": "^3.15.14",
32
+ "@xylabs/ts-scripts-yarn3": "^4.0.0-rc.15",
33
+ "@xylabs/tsconfig": "^4.0.0-rc.15",
41
34
  "typescript": "^5.5.4"
42
35
  },
43
36
  "engines": {
@@ -51,6 +44,6 @@
51
44
  "url": "https://github.com/xylabs/sdk-js.git"
52
45
  },
53
46
  "sideEffects": false,
54
- "version": "3.6.12",
47
+ "version": "4.0.1",
55
48
  "type": "module"
56
49
  }
package/xy.config.ts ADDED
@@ -0,0 +1,12 @@
1
+ import { XyTsupConfig } from '@xylabs/ts-scripts-yarn3'
2
+ const config: XyTsupConfig = {
3
+ compile: {
4
+ browser: {},
5
+ neutral: {
6
+ src: true,
7
+ },
8
+ node: {},
9
+ },
10
+ }
11
+
12
+ export default config
@@ -1,29 +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/index.ts
21
- var src_exports = {};
22
- __export(src_exports, {
23
- exists: () => exists
24
- });
25
- module.exports = __toCommonJS(src_exports);
26
- var exists = (x) => {
27
- return x === void 0 || x === null ? false : true;
28
- };
29
- //# sourceMappingURL=index.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/index.ts"],"sourcesContent":["/**\n * Used to type narrow an object which is possibly null or undefined. Works well\n * with functional Array methods. For example:\n * @example\n * const payloads: XyoPayload[] = boundWitness._payloads?.filter(exists) || []\n * @param x The object which is potentially undefined or null\n * @returns False if the object is null/undefined, true otherwise\n */\nexport const exists = <T>(x?: T | null): x is T => {\n return x === undefined || x === null ? false : true\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAQO,IAAM,SAAS,CAAI,MAAyB;AACjD,SAAO,MAAM,UAAa,MAAM,OAAO,QAAQ;AACjD;","names":[]}
@@ -1,2 +0,0 @@
1
- export declare const exists: <T>(x?: T | null) => x is T;
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,MAAM,GAAI,CAAC,MAAM,CAAC,GAAG,IAAI,KAAG,CAAC,IAAI,CAE7C,CAAA"}
@@ -1,2 +0,0 @@
1
- export declare const exists: <T>(x?: T | null) => x is T;
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,MAAM,GAAI,CAAC,MAAM,CAAC,GAAG,IAAI,KAAG,CAAC,IAAI,CAE7C,CAAA"}
@@ -1,2 +0,0 @@
1
- export declare const exists: <T>(x?: T | null) => x is T;
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,MAAM,GAAI,CAAC,MAAM,CAAC,GAAG,IAAI,KAAG,CAAC,IAAI,CAE7C,CAAA"}
@@ -1,8 +0,0 @@
1
- // src/index.ts
2
- var exists = (x) => {
3
- return x === void 0 || x === null ? false : true;
4
- };
5
- export {
6
- exists
7
- };
8
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/index.ts"],"sourcesContent":["/**\n * Used to type narrow an object which is possibly null or undefined. Works well\n * with functional Array methods. For example:\n * @example\n * const payloads: XyoPayload[] = boundWitness._payloads?.filter(exists) || []\n * @param x The object which is potentially undefined or null\n * @returns False if the object is null/undefined, true otherwise\n */\nexport const exists = <T>(x?: T | null): x is T => {\n return x === undefined || x === null ? false : true\n}\n"],"mappings":";AAQO,IAAM,SAAS,CAAI,MAAyB;AACjD,SAAO,MAAM,UAAa,MAAM,OAAO,QAAQ;AACjD;","names":[]}
@@ -1,29 +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/index.ts
21
- var src_exports = {};
22
- __export(src_exports, {
23
- exists: () => exists
24
- });
25
- module.exports = __toCommonJS(src_exports);
26
- var exists = (x) => {
27
- return x === void 0 || x === null ? false : true;
28
- };
29
- //# sourceMappingURL=index.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/index.ts"],"sourcesContent":["/**\n * Used to type narrow an object which is possibly null or undefined. Works well\n * with functional Array methods. For example:\n * @example\n * const payloads: XyoPayload[] = boundWitness._payloads?.filter(exists) || []\n * @param x The object which is potentially undefined or null\n * @returns False if the object is null/undefined, true otherwise\n */\nexport const exists = <T>(x?: T | null): x is T => {\n return x === undefined || x === null ? false : true\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAQO,IAAM,SAAS,CAAI,MAAyB;AACjD,SAAO,MAAM,UAAa,MAAM,OAAO,QAAQ;AACjD;","names":[]}
@@ -1,2 +0,0 @@
1
- export declare const exists: <T>(x?: T | null) => x is T;
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,MAAM,GAAI,CAAC,MAAM,CAAC,GAAG,IAAI,KAAG,CAAC,IAAI,CAE7C,CAAA"}
@@ -1,2 +0,0 @@
1
- export declare const exists: <T>(x?: T | null) => x is T;
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,MAAM,GAAI,CAAC,MAAM,CAAC,GAAG,IAAI,KAAG,CAAC,IAAI,CAE7C,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,MAAM,GAAI,CAAC,MAAM,CAAC,GAAG,IAAI,KAAG,CAAC,IAAI,CAE7C,CAAA"}
@@ -1,33 +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/index.ts
21
- var src_exports = {};
22
- __export(src_exports, {
23
- exists: () => exists
24
- });
25
- module.exports = __toCommonJS(src_exports);
26
- var exists = (x) => {
27
- return x === void 0 || x === null ? false : true;
28
- };
29
- // Annotate the CommonJS export names for ESM import in node:
30
- 0 && (module.exports = {
31
- exists
32
- });
33
- //# sourceMappingURL=index.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/index.ts"],"sourcesContent":["/**\n * Used to type narrow an object which is possibly null or undefined. Works well\n * with functional Array methods. For example:\n * @example\n * const payloads: XyoPayload[] = boundWitness._payloads?.filter(exists) || []\n * @param x The object which is potentially undefined or null\n * @returns False if the object is null/undefined, true otherwise\n */\nexport const exists = <T>(x?: T | null): x is T => {\n return x === undefined || x === null ? false : true\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAQO,IAAM,SAAS,CAAI,MAAyB;AACjD,SAAO,MAAM,UAAa,MAAM,OAAO,QAAQ;AACjD;","names":[]}
@@ -1,2 +0,0 @@
1
- export declare const exists: <T>(x?: T | null) => x is T;
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,MAAM,GAAI,CAAC,MAAM,CAAC,GAAG,IAAI,KAAG,CAAC,IAAI,CAE7C,CAAA"}
@@ -1,2 +0,0 @@
1
- export declare const exists: <T>(x?: T | null) => x is T;
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,MAAM,GAAI,CAAC,MAAM,CAAC,GAAG,IAAI,KAAG,CAAC,IAAI,CAE7C,CAAA"}
@@ -1,2 +0,0 @@
1
- export declare const exists: <T>(x?: T | null) => x is T;
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,MAAM,GAAI,CAAC,MAAM,CAAC,GAAG,IAAI,KAAG,CAAC,IAAI,CAE7C,CAAA"}
@@ -1,8 +0,0 @@
1
- // src/index.ts
2
- var exists = (x) => {
3
- return x === void 0 || x === null ? false : true;
4
- };
5
- export {
6
- exists
7
- };
8
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/index.ts"],"sourcesContent":["/**\n * Used to type narrow an object which is possibly null or undefined. Works well\n * with functional Array methods. For example:\n * @example\n * const payloads: XyoPayload[] = boundWitness._payloads?.filter(exists) || []\n * @param x The object which is potentially undefined or null\n * @returns False if the object is null/undefined, true otherwise\n */\nexport const exists = <T>(x?: T | null): x is T => {\n return x === undefined || x === null ? false : true\n}\n"],"mappings":";AAQO,IAAM,SAAS,CAAI,MAAyB;AACjD,SAAO,MAAM,UAAa,MAAM,OAAO,QAAQ;AACjD;","names":[]}