isNumber
Import from @varavel/vdl-plugin-sdk/utils/predicates.
Checks if the given value is a number.
This function tests whether the provided value is strictly a number.
It returns true if the value is a number, and false otherwise.
This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to number.
Parameters
| Parameter | Type | Description |
|---|---|---|
x |
unknown |
The value to test if it is a number. |
Returns
x is number
True if the value is a number, false otherwise.