@xylabs/exists 4.13.14 → 4.13.15

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.
@@ -0,0 +1,10 @@
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
+ export declare const exists: <T>(x?: T | null) => x is NonNullable<T>;
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,eAAO,MAAM,MAAM,GAAI,CAAC,EAAE,IAAI,CAAC,GAAG,IAAI,KAAG,CAAC,IAAI,WAAW,CAAC,CAAC,CAE1D,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xylabs/exists",
3
- "version": "4.13.14",
3
+ "version": "4.13.15",
4
4
  "description": "Base functionality used throughout XY Labs TypeScript/JavaScript libraries",
5
5
  "keywords": [
6
6
  "exists",
@@ -36,8 +36,8 @@
36
36
  "module": "./dist/neutral/index.mjs",
37
37
  "types": "./dist/neutral/index.d.ts",
38
38
  "devDependencies": {
39
- "@xylabs/ts-scripts-yarn3": "^7.0.0-rc.12",
40
- "@xylabs/tsconfig": "^7.0.0-rc.12",
39
+ "@xylabs/ts-scripts-yarn3": "^7.0.0-rc.20",
40
+ "@xylabs/tsconfig": "^7.0.0-rc.20",
41
41
  "typescript": "^5.8.3",
42
42
  "vitest": "^3.2.4"
43
43
  },