npm.io
1.0.1 • Published 10 years ago

@f/string-to-boolean

Licence
MIT
Version
1.0.1
Deps
1
Vulns
0
Weekly
0

string-to-boolean

Build status Git tag NPM version Code style

Convert string to boolean.

Installation

$ npm install @f/string-to-boolean

Usage

var stringToBoolean = require('@f/string-to-boolean')

stringToBoolean('true') // => true
stringToBoolean('a') // throws TypeError

API

stringToBoolean(val)
  • val - val to convert to boolean

Returns: boolean or throw TypeError

License

MIT