forked from sombochea/booler
updated readme
This commit is contained in:
parent
05de7642f2
commit
da34f80dc9
47
README.md
47
README.md
@ -11,10 +11,53 @@ $ npm i boolerjs --save
|
||||
## Example
|
||||
|
||||
```js
|
||||
const assert = require('assert');
|
||||
const booler = require('boolerjs')
|
||||
|
||||
console.log(booler('f')) // return false
|
||||
console.log(booler('t')) // return true
|
||||
it('booler will be pass it to equal true', () => {
|
||||
assert.equal(true, booler(true));
|
||||
})
|
||||
|
||||
it('booler will be pass it to equal True', () => {
|
||||
assert.equal(true, booler('True'));
|
||||
})
|
||||
|
||||
it(`booler will be pass it to equal 'true'`, () => {
|
||||
assert.equal(true, booler('true'));
|
||||
})
|
||||
|
||||
it(`booler will be pass it to equal 't'`, () => {
|
||||
assert.equal(true, booler('t'));
|
||||
})
|
||||
|
||||
it(`booler will be pass it to equal '1'`, () => {
|
||||
assert.equal(true, booler('1'));
|
||||
})
|
||||
|
||||
it('booler will be pass it to equal 1', () => {
|
||||
assert.equal(true, booler(1));
|
||||
})
|
||||
|
||||
it('booler will be pass it to equal false', () => {
|
||||
assert.equal(false, booler(false));
|
||||
})
|
||||
|
||||
it(`booler will be pass it to equal 'false'`, () => {
|
||||
assert.equal(false, booler('false'));
|
||||
})
|
||||
|
||||
it(`booler will be pass it to equal 'f'`, () => {
|
||||
assert.equal(false, booler('f'));
|
||||
})
|
||||
|
||||
it(`booler will be pass it to equal '0'`, () => {
|
||||
assert.equal(false, booler(0));
|
||||
})
|
||||
|
||||
it('booler will be pass it to equal 0', () => {
|
||||
assert.equal(false, booler(0));
|
||||
})
|
||||
|
||||
```
|
||||
|
||||
## Run Test
|
||||
|
Loading…
Reference in New Issue
Block a user