is-truthy

0.0.1 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i is-truthy

Weekly Downloads

4

Version

0.0.1

License

MIT

Last publish

Collaborators

  • miguelmota