npm.io
1.0.0 • Published 10 years ago

to-null

Licence
ISC
Version
1.0.0
Deps
0
Vulns
0
Weekly
0

to-null

Converts "nullsy" values to null (undefined, false, NaN), else returns the value

npm install --save to-null
var toNull = require("to-null");

toNull(false); // null
toNull(undefined); // null
toNull(""); // "" not really null
toNull([1,2,3]); // [1,2,3]

Keywords