17 lines
358 B
JavaScript
17 lines
358 B
JavaScript
//#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;
|