1.0.1 • Published 9 years ago

boolean-object v1.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
9 years ago

boolean-object

NPM version License Build status

Convert property values in objects to booleans.

Installation

npm install boolean-object

Usage

var booleanObject = require('boolean-object')

var obj = {
  foo: 'true',
  bar: 'false',
  baz: 1,
  qux: 0,
  str: 'string'
}

booleanObject(obj)
// {
//    foo: true
//    bar: false,
//    baz: true,
//    qux: false,
//    str: 'string'
// }