Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
sanemat committed Jul 1, 2014
1 parent 7a93c7d commit 7d4ddfa
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 13 deletions.
33 changes: 21 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
# boolify-string
[![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-url]][daviddm-image] [![Coverage Status][coveralls-image]][coveralls-url]

The best module ever.
Check a string whether truthy or falsy.

# Use case
Read from environmental variable, e.g. process.env.CI = (TRUE/(empty))
```
if (boolifyString(process.env.CI)){ something_do(); }
```

## Install

Expand All @@ -15,24 +20,28 @@ $ npm install --save boolify-string

```javascript
var boolifyString = require('boolify-string');
boolifyString.awesome(); // "awesome"
```

## API

_(Coming soon)_

boolifyString('true');// #=> true
boolifyString('TRUE');// #=> true
boolifyString('True');// #=> true
boolifyString('false');// #=> false

boolifyString('{}');// #=> true
boolifyString('foo');// #=> true
boolifyString('');// #=> false
boolifyString('1');// #=> true
boolifyString('-1');// #=> true
boolifyString('0');// #=> false
boolifyString('[]');// #=> true
boolifyString('undefined');// #=> false
boolifyString('null');// #=> false
```

## Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [gulp](http://gulpjs.com/).


## Release History

_(Nothing yet)_


## License

Copyright (c) 2014 sanemat. Licensed under the MIT license.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "boolify-string",
"description": "The best module ever.",
"description": "Check a string whether truthy or falsy.",
"version": "0.0.0",
"homepage": "https://github.com/sanemat/node-boolify-string",
"bugs": "https://github.com/sanemat/node-boolify-string/issues",
Expand Down

0 comments on commit 7d4ddfa

Please sign in to comment.