@xylabs/exists 2.11.3 → 2.11.5

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/index.js CHANGED
@@ -1,16 +1,33 @@
1
- 'use strict';
2
-
3
- /**
4
- * Used to type narrow an object which is possibly null or undefined. Works well
5
- * with functional Array methods. For example:
6
- * @example
7
- * const payloads: XyoPayload[] = boundWitness._payloads?.filter(exists) || []
8
- * @param x The object which is potentially undefined or null
9
- * @returns False if the object is null/undefined, true otherwise
10
- */
11
- const exists = (x) => {
12
- return x === undefined || x === null ? false : true;
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;
13
17
  };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
19
 
15
- exports.exists = exists;
16
- //# sourceMappingURL=index.js.map
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.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;;;;;;;AAOG;AACI,MAAA,MAAA,GAAY,CAAA,CAAA,KAAA;;;;;;"}
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":[]}
package/dist/index.mjs CHANGED
@@ -1,14 +1,8 @@
1
- /**
2
- * Used to type narrow an object which is possibly null or undefined. Works well
3
- * with functional Array methods. For example:
4
- * @example
5
- * const payloads: XyoPayload[] = boundWitness._payloads?.filter(exists) || []
6
- * @param x The object which is potentially undefined or null
7
- * @returns False if the object is null/undefined, true otherwise
8
- */
9
- const exists = (x) => {
10
- return x === undefined || x === null ? false : true;
1
+ // src/index.ts
2
+ var exists = (x) => {
3
+ return x === void 0 || x === null ? false : true;
11
4
  };
12
-
13
- export { exists };
14
- //# sourceMappingURL=index.mjs.map
5
+ export {
6
+ exists
7
+ };
8
+ //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../src/index.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA;;;;;;;AAOG;AACI,MAAA,MAAA,GAAY,CAAA,CAAA,KAAA;;;;;;"}
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":[]}
package/package.json CHANGED
@@ -48,8 +48,8 @@
48
48
  "esm"
49
49
  ],
50
50
  "devDependencies": {
51
- "@xylabs/ts-scripts-yarn3": "^3.0.0",
52
- "@xylabs/tsconfig": "^3.0.0",
51
+ "@xylabs/ts-scripts-yarn3": "^3.0.25",
52
+ "@xylabs/tsconfig": "^3.0.25",
53
53
  "typescript": "^5.2.2"
54
54
  },
55
55
  "publishConfig": {
@@ -60,5 +60,5 @@
60
60
  "url": "https://github.com/xylabs/sdk-js.git"
61
61
  },
62
62
  "sideEffects": false,
63
- "version": "2.11.3"
63
+ "version": "2.11.5"
64
64
  }