node-is-nullish
Example
var isNull = ;;//true;//false
Installation
npm i is-nullish
Usage
is-empty:
Differences between falsy, is-nullish, andvalue | typeof value | Boolean(value) | isNull(value) | isEmpty(value) |
---|---|---|---|---|
not defined | "undefined" | false | true | true |
undefined | "undefined" | false | true | true |
null | "object" | false | true | true |
"" | "string" | false | true | true |
NaN | "number" | false | true | false |
0 | "number" | false | false | true |
false | "boolean" | false | false | false |
{} | "object" | true | true* | true |
[] | "object" | true | true* | true |
function () {} | "function" | true | true* | true |
*Objects and functions are nullish unless they have non-nullish enumerable properties.
API Reference
boolean
⏏
isNull(value) ⇒ Kind: Exported function
Params
- value
*
Example
var { return x; };;//truefobjective = "objectify";;//false
License
MPL 2.0