isPrimitive
Checks if a value is a JavaScript primitive.
Primitive types: string, number, boolean, bigint, symbol, null, undefined.
Available since v2.0.0
Import
Section titled “Import”Signature
Section titled “Signature”Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
value | unknown | The value to check |
Returns
Section titled “Returns”value is Primitive — True if value is a primitive
Examples
Section titled “Examples”isPrimitive
Section titled “isPrimitive”Related Types
Section titled “Related Types”Primitive
Section titled “Primitive”Union of all JavaScript primitive types.
