Skip to content

micro-js/string-to-boolean

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Convert string to boolean.

Resources

Stars

Watchers

Forks

Packages

No packages published