Overview
Primitive type guards check whether a value is one of JavaScript’s built‑in primitive types. They return simple booleans, never throw, and never mutate input.
- isBigInteger: Checks whether a value is a
bigintprimitive. - isBoolean: Checks whether a value is a boolean.
- isFiniteNumber: Checks whether a value is a finite number.
- isInteger: Checks whether a value is an integer.
- isNonEmptyString: Checks whether a value is a non‑empty string.
- isNonNegativeNumber: Checks whether a value is a non‑negative number.
- isNull: Checks whether a value is
null. - isNullOrUndefined: Checks whether a value is
nullorundefined. - isNumber: Checks whether a value is a number.
- isPositiveInteger: Checks whether a value is a positive integer.
- isSafeInteger: Checks whether a value is a safe integer.
- isString: Checks whether a value is a string.
- isSymbol: Checks whether a value is a symbol.
- isUndefined: Checks whether a value is
undefined.
All primitive guards are pure, predictable, and safe to use before normalization or validation.