@xylabs/exists 5.0.83 → 5.0.86

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.
Files changed (2) hide show
  1. package/README.md +12 -10
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -15,6 +15,8 @@
15
15
 
16
16
  Base functionality used throughout XY Labs TypeScript/JavaScript libraries
17
17
 
18
+
19
+
18
20
  ## Reference
19
21
 
20
22
  **@xylabs/exists**
@@ -23,7 +25,9 @@ Base functionality used throughout XY Labs TypeScript/JavaScript libraries
23
25
 
24
26
  ## Functions
25
27
 
26
- - [exists](#functions/exists)
28
+ | Function | Description |
29
+ | ------ | ------ |
30
+ | [exists](#functions/exists) | Used to type narrow an object which is possibly null or undefined. Works well with functional Array methods. For example: |
27
31
 
28
32
  ### functions
29
33
 
@@ -34,7 +38,7 @@ Base functionality used throughout XY Labs TypeScript/JavaScript libraries
34
38
  ***
35
39
 
36
40
  ```ts
37
- function exists<T>(x?): x is NonNullable<T>;
41
+ function exists<T>(x?: T | null): x is NonNullable<T>;
38
42
  ```
39
43
 
40
44
  Used to type narrow an object which is possibly null or undefined. Works well
@@ -42,17 +46,15 @@ with functional Array methods. For example:
42
46
 
43
47
  ## Type Parameters
44
48
 
45
- ### T
46
-
47
- `T`
49
+ | Type Parameter |
50
+ | ------ |
51
+ | `T` |
48
52
 
49
53
  ## Parameters
50
54
 
51
- ### x?
52
-
53
- The object which is potentially undefined or null
54
-
55
- `T` | `null`
55
+ | Parameter | Type | Description |
56
+ | ------ | ------ | ------ |
57
+ | `x?` | `T` \| `null` | The object which is potentially undefined or null |
56
58
 
57
59
  ## Returns
58
60
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xylabs/exists",
3
- "version": "5.0.83",
3
+ "version": "5.0.86",
4
4
  "description": "Base functionality used throughout XY Labs TypeScript/JavaScript libraries",
5
5
  "keywords": [
6
6
  "exists",
@@ -42,8 +42,8 @@
42
42
  "!**/*.test.*"
43
43
  ],
44
44
  "devDependencies": {
45
- "@xylabs/ts-scripts-yarn3": "~7.4.11",
46
- "@xylabs/tsconfig": "~7.4.11",
45
+ "@xylabs/ts-scripts-yarn3": "~7.4.16",
46
+ "@xylabs/tsconfig": "~7.4.16",
47
47
  "typescript": "~5.9.3",
48
48
  "vitest": "~4.0.18"
49
49
  },