zeroable
v0.0.1
Published
NaN = 0, customizable and flex, any falsy value to zero.
Readme
NaN = 0, it should be.
Faster than Number,parseInt, and parseFloat.
Wrapped to make it look clean.
npm install zeroableES6
import zeroable from "zeroable";
console.log(zeroable("SSSS")); // returns 0
console.log(zeroable("11.1")); // returns 11.1
console.log(zeroable()); // returns 0CJS
const zeroable = require("zeroable");
console.log(zeroable("SSSS")); // returns 0
console.log(zeroable("11.1")); // returns 11.1
console.log(zeroable()); // returns 0This library using MIT License
