1.0.0 • Published 8 years ago
to-null v1.0.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]
1.0.0
8 years ago