is-truthy
v0.0.1
Published
Predicate that returns true for "truthy" values.
Downloads
13
Readme
is-truthy
Predicate that returns true for truthy values.
Install
npm install is-truthy
bower install is-truthy
Usage
var isTruthy = require('is-truthy');
console.log(isTruthy('')); // false
console.log(isTruthy(0)); // false
console.log(isTruthy(null)); // false
console.log(isTruthy(undefined)); // false
console.log(isTruthy(1)); // true
console.log(isTruthy({})); // true
console.log(isTruthy([])); // true
console.log(isTruthy(function() { })); // true
License
MIT