Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/aleclarson/parse-bool

Convert a string to a boolean
https://github.com/aleclarson/parse-bool

Last synced: 19 days ago
JSON representation

Convert a string to a boolean

Awesome Lists containing this project

README

        

# parse-bool 0.0.2 ![stable](https://img.shields.io/badge/stability-stable-4EBA0F.svg?style=flat)

```CoffeeScript
parseBool = require "parse-bool"

parseBool "true" # true
parseBool "yes" # true
parseBool "y" # true
parseBool "1" # true

parseBool "false" # false
parseBool "no" # false
parseBool "n" # false
parseBool "0" # false
```

Any other input returns `null`.