Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/aleclarson/parse-bool
- Owner: aleclarson
- License: mit
- Created: 2015-07-01T02:03:49.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-12-05T16:51:05.000Z (almost 6 years ago)
- Last Synced: 2024-10-13T04:06:48.643Z (24 days ago)
- Language: JavaScript
- Homepage:
- Size: 5.86 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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" # trueparseBool "false" # false
parseBool "no" # false
parseBool "n" # false
parseBool "0" # false
```Any other input returns `null`.