@zerodep/is-null
v2.0.7
Published
A utility to determine if a value is null
Downloads
21
Readme
@zerodep/is-null
A simple, performant utility to determine if a value is null
.
Full documentation is available at the zerodep.app page.
Examples
All @zerodep packages support both ESM and CJS.
import { isNull } from '@zerodep/is-null';
// or
const { isNull } = require('@zerodep/is-null');
Positive Response
isNull(null); // true
Negative Response
isNull(['a', 'b', 'c']); // false
isNull(1000n); // false
isNull(true); // false
isNull(new Date()); // false
isNull(''); // false
isNull(new Error('message')); // false
isNull(3.14); // false
isNull(() => 'function'); // false
isNull(42); // false
isNull(
new Map([
['a', 1],
['b', 2],
])
); // false
isNull({ an: 'object' }); // false
isNull(new Promise(() => {})); // false
isNull(/[regex]+/gi); // false
isNull(new Set([1, 2, 3])); // false
isNull('a string'); // false
isNull(Symbol()); // false
isNull(new Int32Array(2)); // false
isNull(undefined); // false