{"_id":"boolify","_rev":"1646971","name":"boolify","description":"Convert true/false strings to booleans","dist-tags":{"latest":"1.0.1"},"maintainers":[{"name":"timhudson","email":"tim.hudson15@gmail.com"}],"time":{"modified":"2026-10-27T16:13:19.000Z","created":"2013-04-12T21:58:38.988Z","1.0.1":"2017-05-18T22:25:08.318Z","1.0.0":"2015-05-08T05:58:29.453Z","0.0.1":"2013-04-12T21:58:38.988Z"},"users":{},"repository":{"url":"git://github.com/timhudson/boolify.git"},"versions":{"1.0.1":{"name":"boolify","description":"Convert true/false strings to booleans","version":"1.0.1","license":"MIT","repository":{"url":"git://github.com/timhudson/boolify.git"},"main":"index.js","scripts":{"test":"tape test/*.js"},"devDependencies":{"tape":"^4.0.0"},"gitHead":"84d32b02f83173baa3c3d3c09adb1ba705550a49","bugs":{"url":"https://github.com/timhudson/boolify/issues"},"homepage":"https://github.com/timhudson/boolify#readme","_id":"boolify@1.0.1","_shasum":"b5c09e17cacd113d11b7bb3ed384cc012994d86b","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.10.0","_npmUser":{"name":"timhudson","email":"tim.hudson15@gmail.com"},"dist":{"shasum":"b5c09e17cacd113d11b7bb3ed384cc012994d86b","tarball":"http://registry-npm.ywwl.com/boolify/download/boolify-1.0.1.tgz","integrity":"sha512-ma2q0Tc760dW54CdOyJjhrg/a54317o1zYADQJFgperNGKIKgAUGIcKnuMiff8z57+yGlrGNEt4lPgZfCgTJgA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCyP4rxgFHeECPrjOl0jJlxUF9rJKNauQn2RI0KETVYnwIge3LTS8/m8NL/O8QUka5e8+1Ra7gV6QGNdxTEYFyq7SA="}],"size":1586,"noattachment":false,"key":"/boolify/-/boolify-1.0.1.tgz"},"maintainers":[{"name":"timhudson","email":"tim.hudson15@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/boolify-1.0.1.tgz_1495146308079_0.6707604024559259"},"publish_time":1495146308318,"_cnpm_publish_time":1495146308318},"1.0.0":{"name":"boolify","description":"Convert true/false strings to booleans","version":"1.0.0","repository":{"url":"git://github.com/timhudson/boolify.git"},"main":"index.js","scripts":{"test":"tape test/*.js"},"devDependencies":{"tape":"^4.0.0"},"gitHead":"3999575b1b005efd9732c108f67a37bfb4a14f06","bugs":{"url":"https://github.com/timhudson/boolify/issues"},"homepage":"https://github.com/timhudson/boolify","_id":"boolify@1.0.0","_shasum":"4523d3550215cc1f2b567b9a015cfbcd5e6e038b","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"timhudson","email":"tim.hudson15@gmail.com"},"maintainers":[{"name":"timhudson","email":"tim.hudson15@gmail.com"}],"dist":{"shasum":"4523d3550215cc1f2b567b9a015cfbcd5e6e038b","tarball":"http://registry-npm.ywwl.com/boolify/download/boolify-1.0.0.tgz","integrity":"sha512-JUSf6Mkl1/RA7qGK7qmchq1U+KsNE55OBcW6UWU1Zy2O3r5jVfq1cLIbbw6Jxj6/uS7XqaLsyvtPZ1DrbLDndA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGkZTHtrbLwFs8WbKuzW6JGWs8l80XuwEGltRlXZL6xtAiEAsl8uqMrOmh3/Ym2WZULl3dTknSc+264cND5YoUyVc9w="}],"size":1580,"noattachment":false,"key":"/boolify/-/boolify-1.0.0.tgz"},"publish_time":1431064709453,"_cnpm_publish_time":1431064709453},"0.0.1":{"name":"boolify","description":"Convert true/false strings to booleans","version":"0.0.1","repository":{"url":"git://github.com/timhudson/boolify.git"},"main":"index.js","scripts":{"test":"tap test/*.js"},"dependencies":{},"devDependencies":{"tap":"~0.4.1"},"_id":"boolify@0.0.1","dist":{"shasum":"e0c707594440281eec007bbe6d9e5d6086b59304","tarball":"http://registry-npm.ywwl.com/boolify/download/boolify-0.0.1.tgz","integrity":"sha512-YrNCjzv8dGP8gPja9Cm1poStLxk5i71BXVRCb5eoieXgG0CqJPo+SJU2rT8smLXCZ3lmx08hcePs2J7b/PErFw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDA+xr2T2oYC3j/dpgZuf4MP3JGPzX+LN2iRkh+q2mrJAiAi1+fv+tN8tnQXy4w8unp8cyY9XzgfjXJ0VjWMu8z4Lg=="}],"size":1287,"noattachment":false,"key":"/boolify/-/boolify-0.0.1.tgz"},"_from":".","_npmVersion":"1.2.17","_npmUser":{"name":"timhudson","email":"tim.hudson15@gmail.com"},"maintainers":[{"name":"timhudson","email":"tim.hudson15@gmail.com"}],"publish_time":1365803918988,"_cnpm_publish_time":1365803918988}},"readme":"# boolify\n\nConvert true/false strings to booleans\n\n[![Build Status](https://travis-ci.org/timhudson/boolify.png?branch=master)](https://travis-ci.org/timhudson/boolify)\n\n## Example\n\n``` js\nvar boolify = require('boolify')\n\nboolify('true')\n// true\n\nboolify('false')\n// false\n\nboolify('A string')\n// \"A string\"\n\nvar obj = boolify({\n  t: 'true',\n  f: 'false',\n  s: 'Another string',\n  n: 5\n})\n// {\n//   t: true,\n//   f: false,\n//   s: 'Another string',\n//   n: 5\n// }\n\nboolify('TRUE')\n// true\n\nboolify('tRuE')\n// true\n```\n\n## Usage\n\n`boolify` is case-insensitive and will convert any string of `\"true\"` or `\"false\"` in to the\nappropriate boolean.\n\nThis is helpful for handling checkboxes in express' `req.body`\n\n``` js\napp.put('/users/:username', function(req, res) {\n  console.log(req.body.someCheckbox) // 'true'\n  req.body = boolify(req.body)\n  console.log(req.body.someCheckbox) // true\n})\n```\n\n### `boolify(object | string)`\n\nIf provided an object, `boolify` will recursively convert all values.\n\n``` js\nvar result = boolify({one: {fish: {two: {fish: 'true'}}}})\nconsole.log(result.one.fish.two.fish)\n// true\n```\n\n## Install\n\nWith [npm](https://npmjs.org) do:\n\n```\nnpm install boolify\n```\n\n## See also\n\n * [yn](https://github.com/sindresorhus/yn) supports additional values for booleans, both uppercase and lowercase, and returns null when a value is recognized is neither `true` or `false`\n\n## License\n\nMIT\n","_attachments":{},"homepage":"https://github.com/timhudson/boolify#readme","bugs":{"url":"https://github.com/timhudson/boolify/issues"},"license":"MIT"}