@xylabs/exists 5.0.79 → 5.0.81

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/README.md CHANGED
@@ -52,7 +52,7 @@ with functional Array methods. For example:
52
52
 
53
53
  The object which is potentially undefined or null
54
54
 
55
- `null` | `T`
55
+ `T` | `null`
56
56
 
57
57
  ## Returns
58
58
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xylabs/exists",
3
- "version": "5.0.79",
3
+ "version": "5.0.81",
4
4
  "description": "Base functionality used throughout XY Labs TypeScript/JavaScript libraries",
5
5
  "keywords": [
6
6
  "exists",
@@ -29,24 +29,21 @@
29
29
  "exports": {
30
30
  ".": {
31
31
  "types": "./dist/neutral/index.d.ts",
32
- "source": "./src/index.ts",
33
32
  "default": "./dist/neutral/index.mjs"
34
33
  },
35
34
  "./package.json": "./package.json"
36
35
  },
37
36
  "module": "./dist/neutral/index.mjs",
38
- "source": "./src/index.ts",
39
37
  "types": "./dist/neutral/index.d.ts",
40
38
  "files": [
41
39
  "dist",
42
- "src",
43
40
  "!**/*.bench.*",
44
41
  "!**/*.spec.*",
45
42
  "!**/*.test.*"
46
43
  ],
47
44
  "devDependencies": {
48
- "@xylabs/ts-scripts-yarn3": "~7.3.2",
49
- "@xylabs/tsconfig": "~7.3.2",
45
+ "@xylabs/ts-scripts-yarn3": "~7.4.11",
46
+ "@xylabs/tsconfig": "~7.4.11",
50
47
  "typescript": "~5.9.3",
51
48
  "vitest": "~4.0.18"
52
49
  },
package/src/index.ts DELETED
@@ -1,11 +0,0 @@
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 const exists = <T>(x?: T | null): x is NonNullable<T> => {
10
- return x === undefined || x === null ? false : true
11
- }