truthyfalsy
v1.0.0
Published
truthy or falsy on steroid
Downloads
2
Readme
truthyfalsy
truthy or falsy on steroid
const truthfalsy = require('../index');
console.assert(truthfalsy('no') === false); console.assert(truthfalsy('yes') === true); console.assert(truthfalsy('nup') === false); console.assert(truthfalsy('nil') === false); console.assert(truthfalsy('false') === false); console.assert(truthfalsy('FALSE') === false); console.assert(truthfalsy('NIL') === false); console.assert(truthfalsy('YES') === true); console.assert(truthfalsy('') === false); console.assert(truthfalsy('0') === true); console.assert(truthfalsy(0) === false);