1.0.0 • Published 10 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-nullvar toNull = require("to-null");
toNull(false); // null
toNull(undefined); // null
toNull(""); // "" not really null
toNull([1,2,3]); // [1,2,3]1.0.0
10 years ago