to-null

1.0.0 • Public • Published

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]

Readme

Keywords

Package Sidebar

Install

npm i to-null

Weekly Downloads

8

Version

1.0.0

License

ISC

Last publish

Collaborators

  • rangermauve