Skip to content

isPrimitive

isPrimitive(value): value is Primitive

Defined in: packages/core/src/guards/is-primitive.ts:14

Check if a value is a primitive.

A primitive is a value that is not an object and has no methods. There are 7 primitive data types: string, number, bigint, boolean, symbol, null, and undefined.

unknown

The value to check

value is Primitive

True if the value is a primitive

https://developer.mozilla.org/en-US/docs/Glossary/Primitive