@mapcss/preset-svg
Version:
SVG as CSS for MapCSS
23 lines (22 loc) • 519 B
JavaScript
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 };