{"name":"boolean","version":"3.0.1","description":"boolean converts lots of things to boolean.","contributors":[{"name":"Golo Roden","email":"golo.roden@thenativeweb.io"},{"name":"Matthias Wagler","email":"matthias.wagler@thenativeweb.io"},{"name":"Ryan Smith","email":"ryan.smith@ht2labs.com"},{"name":"Thomas Schaaf","email":"schaaf@komola.de"}],"main":"build/lib/boolean.js","types":"build/lib/boolean.d.ts","dependencies":{},"devDependencies":{"assertthat":"5.1.0","roboter":"11.0.16","semantic-release-configuration":"1.0.16"},"repository":{"type":"git","url":"git://github.com/thenativeweb/boolean.git"},"keywords":["boolean","parser"],"license":"MIT","gitHead":"4aa637008663410d293a85a209f9ec1c4f487fa9","bugs":{"url":"https://github.com/thenativeweb/boolean/issues"},"homepage":"https://github.com/thenativeweb/boolean#readme","_id":"boolean@3.0.1","_nodeVersion":"12.15.0","_npmVersion":"6.13.7","dist":{"integrity":"sha512-HRZPIjPcbwAVQvOTxR4YE3o8Xs98NqbbL1iEZDCz7CL8ql0Lt5iOyJFxfnAB0oFs8Oh02F/lLlg30Mexv46LjA==","shasum":"35ecf2b4a2ee191b0b44986f14eb5f052a5cbb4f","tarball":"http://registry-npm.ywwl.com/boolean/download/boolean-3.0.1.tgz","fileCount":10,"unpackedSize":5734,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeQozCCRA9TVsSAnZWagAA98MQAI1ImBnXokzZMlXkI3eO\ngY9aGDPuLfciBkhuJnpRhBTF+BW2060TukWeMvkEMRo56F+EoYfhpRWJBJcL\n74rkv2+OZXs+K8jnxT0yfsUVI5r6mAeEyXguBjWQR6wzX0KGdCkynOpofxXk\nhWdlLnvJOQquBGhnNkkoumDTeb1g3tPQoUlslrd/YCn2sLLLgpe36vUNA05l\nWwHbKrognx4F9FaG1/x4N9A3+eYbOiQZVzn0rkd2m3v7QcBYsQyRtaSFD4+G\neUSlrHV22krQZarHyaPh6caG/1hCmRGRmTuafCLM4NkYvWnJwYVy8BLWscQO\n8IGcsfN7fU5p1nPVHQznlfOQ/xPTnVFtZY9m9s788T1ryQyx5LUVi8i1F5MG\n7Md0TEJblySaPxrdS/akYIS6dLInx+ksdxxDgBAVXL5JHaxPLTDDMNaI95ql\ncHzuPJKr/9Ay5+iKAtMtrh75OYYliVvDEPq4POB3MIitIrYskxXodWloBCZP\nUInfg6/1DgW1e7X+6n+Qvi6Ih945g0sekIN08+48VHwnWU8WB5Z3PjbajIFQ\niVl8brFwDzFlWRALiR6A+kgDiC9WZs9314BLr/xB24Snij5y4n4h9NO+FmnA\nx/M/kRLDpNr3pe9jIJnRWwOVu/aj7DaJbidtXlqr7p+L6aksVqrNkl0JLG4+\n2DJj\r\n=4qtg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIExZqIds/64OCKZiX1Iivxx6Gu5gP6RiCQwwE/YUitKiAiBF66pOwvEM4CMHZ9wzeOgZ2IxFM/BlimLd27UKKS078Q=="}],"size":2627,"noattachment":false,"key":"/boolean/-/boolean-3.0.1.tgz"},"maintainers":[{"email":"golo.roden@thenativeweb.io","name":"goloroden"},{"email":"wagler@intuity.de","name":"mattwagl"},{"email":"hello@thenativeweb.io","name":"thenativeweb-admin"},{"email":"hannes.leutloff@yeldirium.de","name":"yeldir"}],"_npmUser":{"name":"thenativeweb-admin","email":"hello@thenativeweb.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/boolean_3.0.1_1581419713992_0.2556049596290284"},"_hasShrinkwrap":false,"readme":"# boolean\n\nboolean converts lots of things to boolean.\n\n## Status\n\n| Category         | Status                                                                                                                                     |\n| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |\n| Version          | [![npm](https://img.shields.io/npm/v/boolean)](https://www.npmjs.com/package/boolean)                                                      |\n| Dependencies     | ![David](https://img.shields.io/david/thenativeweb/boolean)                                                                                |\n| Dev dependencies | ![David](https://img.shields.io/david/dev/thenativeweb/boolean)                                                                            |\n| Build            | ![GitHub Actions](https://github.com/thenativeweb/boolean/workflows/Release/badge.svg?branch=main) |\n| License          | ![GitHub](https://img.shields.io/github/license/thenativeweb/boolean)                                                                      |\n\n## Installation\n\n```shell\n$ npm install boolean\n```\n\n## Quick start\n\nFirst you need to add a reference to boolean in your application:\n\n```javascript\nconst { boolean, isBooleanable } = require('boolean');\n```\n\nIf you use TypeScript, use the following code instead:\n\n```typescript\nimport { boolean, isBooleanable } from 'boolean';\n```\n\nTo verify a value for its boolean value, call the `boolean` function and provide the value in question as parameter:\n\n```javascript\nconsole.log(boolean('true')); // => true\n```\n\nThe `boolean` function considers the following values to be equivalent to `true`:\n\n-   `true` (boolean)\n-   `'true'` (string)\n-   `'TRUE'` (string)\n-   `'t'` (string)\n-   `'T'` (string)\n-   `'yes'` (string)\n-   `'YES'` (string)\n-   `'y'` (string)\n-   `'Y'` (string)\n-   `'on'` (string)\n-   `'ON'` (string)\n-   `'1'` (string)\n-   `1` (number)\n\nIn addition to the primitive types mentioned above, boolean also supports their object wrappers `Boolean`, `String`, and `Number`.\n\n_Please note that if you provide a `string` or a `String` object, it will be trimmed._\n\nAll other values, including `undefined` and `null` are considered to be `false`.\n\n### Figuring out whether a value can be considered to be boolean\n\nFrom time to time, you may not want to directly convert a value to its boolean equivalent, but explicitly check whether it looks like a boolean. E.g., although `boolean('F')` returns `false`, the string `F` at least looks like a boolean, in contrast to something such as `123` (for which `boolean(123)` would also return `false`).\n\nTo figure out whether a value can be considered to be a boolean, use the `isBooleanable` function:\n\n```javascript\nconsole.log(isBooleanable('true')); // => true\n```\n\nThe `isBooleanable` function considers all of the above mentioned values to be reasonable boolean values, and additionally, also the following ones:\n\n-   `false` (boolean)\n-   `'false'` (string)\n-   `'FALSE'` (string)\n-   `'f'` (string)\n-   `'F'` (string)\n-   `'no'` (string)\n-   `'NO'` (string)\n-   `'n'` (string)\n-   `'N'` (string)\n-   `'off'` (string)\n-   `'OFF'` (string)\n-   `'0'` (string)\n-   `0` (number)\n\n## Running quality assurance\n\nTo run quality assurance for this module use [roboter](https://www.npmjs.com/package/roboter):\n\n```shell\n$ npx roboter\n```\n","publish_time":1581419714162,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","_cnpm_publish_time":1581419714162,"dist-tags":{"latest":"3.2.0"}}