isPrimitive
Checks if the given value is primitive
97 bytes
Usage
Checks if the given value is primitive.
Primitive Types: number , string , boolean , symbol, bigint, undefined, null
import * as import _
_ from 'radashi'
import _
_.function isPrimitive(value: any): booleanexport isPrimitive
Checks if the given value is primitive.
Primitive types include:
- number
- string
- boolean
- symbol
- bigint
- undefined
- null
isPrimitive(22) // => trueimport _
_.function isPrimitive(value: any): booleanexport isPrimitive
Checks if the given value is primitive.
Primitive types include:
- number
- string
- boolean
- symbol
- bigint
- undefined
- null
isPrimitive('hello') // => trueimport _
_.function isPrimitive(value: any): booleanexport isPrimitive
Checks if the given value is primitive.
Primitive types include:
- number
- string
- boolean
- symbol
- bigint
- undefined
- null
isPrimitive(['hello']) // => false