1.1.3 • Published 6 years ago

mkbool v1.1.3

Weekly downloads
14
License
MIT
Repository
github
Last release
6 years ago

mkbool

Convert any value to boolean

npm url

https://www.npmjs.com/package/mkbool

Getting started

  1. Install the package npm i mkbool or npm i mkbool@beta
  2. Require to your script var mkbool = require('mkbool');
  3. And use it var isBool = mkbool('any value or variable')

mkbool is able to check types of

  • Infinity number 5/0
  • NaN
  • Integer number
  • Floating number
  • Empty Array []
  • Array with item [1, 2, 0, ...]
  • Empty Object {}
  • Object with item {key: 'value'}
  • Empty string ''
  • String 'any string'
  • And more

Test

test.js is initialized with several values which will go through each value and return mkbool type. Run npm test to test. Change values on test.js to test your values.

Standard test will be added later.

1.1.3

6 years ago

2.0.0

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

1.0.1-beta

6 years ago

1.0.0-beta

6 years ago