1.0.0 • Published 9 years ago

booleanify v1.0.0

Weekly downloads
98
License
MIT
Repository
github
Last release
9 years ago

booleanify Build Status

Convert a value to a boolean - recognizes 'true' and 'false' strings

Install

$ npm install --save booleanify

Usage

var booleanify = require('booleanify');

booleanify('true');
//=> true

booleanify('false');
//=> false

booleanify(false);
//=> false

booleanify(0);
//=> false

booleanify('');
//=> false

booleanify(null);
//=> false

booleanify(123);
//=> true

booleanify('foobar');
//=> true

License

MIT © Arthur Verschaeve