@xylabs/exists 3.6.12 → 4.0.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.d.ts +3 -2
- package/package.json +5 -12
- package/xy.config.ts +12 -0
- package/dist/browser/index.cjs +0 -29
- package/dist/browser/index.cjs.map +0 -1
- package/dist/browser/index.d.cts +0 -2
- package/dist/browser/index.d.cts.map +0 -1
- package/dist/browser/index.d.mts +0 -2
- package/dist/browser/index.d.mts.map +0 -1
- package/dist/browser/index.d.ts +0 -2
- package/dist/browser/index.d.ts.map +0 -1
- package/dist/browser/index.mjs +0 -8
- package/dist/browser/index.mjs.map +0 -1
- package/dist/neutral/index.cjs +0 -29
- package/dist/neutral/index.cjs.map +0 -1
- package/dist/neutral/index.d.cts +0 -2
- package/dist/neutral/index.d.cts.map +0 -1
- package/dist/neutral/index.d.mts +0 -2
- package/dist/neutral/index.d.mts.map +0 -1
- package/dist/neutral/index.d.ts.map +0 -1
- package/dist/node/index.cjs +0 -33
- package/dist/node/index.cjs.map +0 -1
- package/dist/node/index.d.cts +0 -2
- package/dist/node/index.d.cts.map +0 -1
- package/dist/node/index.d.mts +0 -2
- package/dist/node/index.d.mts.map +0 -1
- package/dist/node/index.d.ts +0 -2
- package/dist/node/index.d.ts.map +0 -1
- package/dist/node/index.mjs +0 -8
- package/dist/node/index.mjs.map +0 -1
package/dist/neutral/index.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
-
"
|
|
17
|
-
|
|
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": "^
|
|
40
|
-
"@xylabs/tsconfig": "^
|
|
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": "
|
|
47
|
+
"version": "4.0.0",
|
|
55
48
|
"type": "module"
|
|
56
49
|
}
|
package/xy.config.ts
ADDED
package/dist/browser/index.cjs
DELETED
|
@@ -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":[]}
|
package/dist/browser/index.d.cts
DELETED
|
@@ -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"}
|
package/dist/browser/index.d.mts
DELETED
|
@@ -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"}
|
package/dist/browser/index.d.ts
DELETED
|
@@ -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"}
|
package/dist/browser/index.mjs
DELETED
|
@@ -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":[]}
|
package/dist/neutral/index.cjs
DELETED
|
@@ -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":[]}
|
package/dist/neutral/index.d.cts
DELETED
|
@@ -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"}
|
package/dist/neutral/index.d.mts
DELETED
|
@@ -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"}
|
package/dist/node/index.cjs
DELETED
|
@@ -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
|
package/dist/node/index.cjs.map
DELETED
|
@@ -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":[]}
|
package/dist/node/index.d.cts
DELETED
|
@@ -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"}
|
package/dist/node/index.d.mts
DELETED
|
@@ -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"}
|
package/dist/node/index.d.ts
DELETED
package/dist/node/index.d.ts.map
DELETED
|
@@ -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"}
|
package/dist/node/index.mjs
DELETED
package/dist/node/index.mjs.map
DELETED
|
@@ -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":[]}
|