to-boolean
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/to-boolean package

1.0.0 • Public • Published

to-boolean Build Status

Convert strings to boolean.

Install

Via npm:

$ npm install to-boolean --save

Via Bower:

$ bower install to-boolean --save

Usage

var toBoolean = require('to-boolean');
 
toBoolean('y'); // true
toBoolean('no'); // false
toBoolean(''); // false
toBoolean('  '); // false
toBoolean('1'); // true

License

MIT © Rafael Rinaldi

Package Sidebar

Install

npm i to-boolean

Weekly Downloads

1,664

Version

1.0.0

License

MIT

Last publish

Collaborators

  • rafaelrinaldi