Skip to content

Commit 38ce4d4

Browse files
committed
docs: refine Type Predicates section in README for clarity and organization
1 parent c70a3aa commit 38ce4d4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -168,11 +168,8 @@ console.log(overlapping); // 3
168168

169169
### Type Predicates
170170

171-
Type guard functions for runtime type checking and type narrowing:
171+
Type guard functions for runtime type checking and type narrowing
172172

173-
- `isDefined` - Checks if a value is defined (not null or undefined)
174-
- `isInstanceOfClass` - Checks if a value is an instance of a class
175-
- `isOneOf` - Checks if a value is one of the allowed values
176173
- `isString` - Checks if a value is a string
177174
- `isNumber` - Checks if a value is a number
178175
- `isBoolean` - Checks if a value is a boolean
@@ -182,7 +179,10 @@ Type guard functions for runtime type checking and type narrowing:
182179
- `isObject` - Checks if a value is an object (not null)
183180
- `isUndefined` - Checks if a value is undefined
184181
- `isNull` - Checks if a value is null
185-
- `isNullish` - Checks if a value is null or undefined
182+
- `isNullish` - Checks if a value is null or undefined:
183+
- `isDefined` - Checks if a value is defined (not null or undefined)
184+
- `isInstanceOfClass` - Checks if a value is an instance of a class
185+
- `isOneOf` - Checks if a value is one of the allowed values
186186
- `isTupleOf` - Checks if an array has exactly the specified length (e.g., `isTupleOf(numbers, 2)` asserts `[number, number]`)
187187
- `isTupleOfAtLeast` - Checks if an array has at least the specified length (e.g., `isTupleOfAtLeast(numbers, 2)` asserts `[number, number, ...number[]]`)
188188

0 commit comments

Comments
 (0)