UNPKG

@mapcss/preset-svg

Version:
23 lines (22 loc) 519 B
import { isNull } from "../isNull/mod.js"; import { isUndefined } from "../isUndefined/mod.js"; /** * Whatever argument is type of `null` or `undefined` not * * @param value - Input any value * @returns The result of `value === null` | `typeof value === 'undefined'` * * @example * ```ts * import { isNil } from './mod.ts' * isNil(null) // true * isNil(undefined) // true * isNil({}) // false * ``` * * @beta */ function isNil(value) { return isNull(value) || isUndefined(value); } export { isNil };