Skip to content

isPrimitive

Checks if the given value is primitive. Primitive types include: - number - string - boolean - symbol - bigint - undefined - null

Usage

isPrimitive(0); // => true
isPrimitive(null); // => true
isPrimitive(undefined); // => true
isPrimitive("0"); // => false

Installation

Terminal window
npx atmx add helper is-primitive