A lightweight utility library for common JavaScript checks, including isEmpty, isNull, isNumber, isEmptyString, isArray, and isNaN. Useful for validation and data handling.
npm install checkify-utilsA lightweight utility library for common JavaScript checks, including isEmpty, isNull, isNumber, isEmptyString, isArray, and isNaN. Useful for validation and data handling.
``sh`
npm install checkify-utils
or
`sh`
yarn add checkify-utils
`ts
import {
isEmpty,
isNull,
isNumber,
isEmptyString,
isArray,
isNaN,
} from "checkify-utils";
console.log(isEmpty([])); // true
console.log(isEmpty({})); // true
console.log(isNull(null)); // true
console.log(isNull(undefined)); // true
console.log(isNumber(42)); // true
console.log(isNumber(0)); // true
console.log(isEmptyString("")); // true
console.log(isArray([1, 2, 3])); // true
console.log(isNaN(NaN)); // true
`
Checks if the given value is empty ([], {}).
Checks if the given value is null or undefined.
Checks if the given value is a number (including 0).
Checks if the given value is an empty string ("").
Checks if the given value is an array.
Checks if the given value is NaN`.
MIT