@f/string-to-boolean

1.0.1 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i @f/string-to-boolean

Weekly Downloads

4

Version

1.0.1

License

MIT

Last publish

Collaborators

  • f