UNPKG

es-toolkit

Version:

A state-of-the-art, high-performance JavaScript utility library with a small bundle size and strong type annotations.

18 lines (17 loc) 358 B
//#region src/compat/predicate/isNull.ts /** * Checks if `value` is `null`. * * @param value - The value to check. * @returns Returns `true` if `value` is `null`, else `false`. * * @example * isNull(null); // true * isNull(undefined); // false * isNull(0); // false */ function isNull(value) { return value === null; } //#endregion exports.isNull = isNull;