{"_id":"read-boolean","_rev":"2-c44a5c905ed912a705138b6d500b5778","name":"read-boolean","dist-tags":{"latest":"2.0.0"},"versions":{"1.0.0":{"name":"read-boolean","version":"1.0.0","description":"Parse a boolean from a string","license":"MIT","author":{"name":"Connor White","email":"connor.bcw@gmail.com","url":"https://connorwhite.org"},"homepage":"https://connorwhite.org/github/read-boolean","repository":{"type":"git","url":"git+https://github.com/bconnorwhite/read-boolean.git"},"keywords":["read","parse","boolean","string","to","convert","cast"],"main":"./build/index.js","scripts":{"build":"bob build","commit":"bob commit","lint":"bob lint","release":"bob publish","test":"bob test"},"devDependencies":{"@bconnorwhite/bob":"^2.9.4"},"eslintConfig":{"extends":"eslint-config-bob"},"husky":{"hooks":{"commit-msg":"bob lint commit"}},"npmpackagejsonlint":{"extends":"npm-package-json-lint-config-bob"},"_id":"read-boolean@1.0.0","dist":{"shasum":"c7a4e998c75207ed63ea68b0f00330279ac65de0","integrity":"sha512-/u98G1JEtswAfd9OkMGekx0fv6GGVn9KeObeH7MhkJZxXHapt/5wxER6xWx6aQqXhZ+gYkL7uLvt8JtIi82amg==","tarball":"https://registry.npmjs.org/read-boolean/-/read-boolean-1.0.0.tgz","fileCount":7,"unpackedSize":3152,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3onPCRA9TVsSAnZWagAAwQQP/jHoFcIWI1lhriGVd45u\ntBK7n0GsY58hjzS7ChTtL7rT7X+NqbyC/L6dEBSPrMPAkVGnv0KgzQIIkwLN\n93F4e1tWJUilQsKOc5R+Ne/NAh3Vm2iUSF+Z3Y/k4zugee7VXRMBo+tSKIz0\nOL8r7NSAb+vgwmFZ3LEP3LLzRIYr2Whj/3PpDicYAvjhPvCFz6o60VGxGrUg\nzbETjf8oX7a4iFUm87C3DAAmk9mU2TvI1Kf3BfKXO6WZvZhCRNelBeKTXgbS\n3juIQySQ8ABnEFo+MLdttqoRZFRPHYKuJwDaTHYXZGoiqJxl+GxkD8f73Jxp\nA0VjrntxyLXfEEi4nG0KUrdSOKAQVj3lWcHi/Nx/rYNYyEFvpJmpIetm/OGP\n6t/JAZS6Exl/ht/zha3tztDtZ9njcccF9u9WLMpSDJgdb9rI/H/o+MqIt7Ra\nUYqElkvXkeSqqq/FOP4iYgWbQPu9gQTBoFdg+ZfwVe88FprOCzapAGVYJn90\nSuOTBlRuL80sy08h6y7+VpjzfLVktvDDFcAumYlwm8zWpz65BIbqIPiTqP5e\nkW541ZGCLn/2i2xLhnm82kttF/qR03zOzmgbVkIKv0J8BupRPwQbu1RiKWCA\nghyIeTgyuQG98YxOz/FXx1j79Tqv94nEmF6ofnDPbjmkBBITx4RhZcthXyVF\nTyKR\r\n=r+ML\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFsLbt83+nqQ3rgjTff+a7NZgv0jF/DnRNR31JIC0oUQAiEAx1heExCoE6n4+LOtvI4Y6ug80xObjN8zW18lxqcSStM="}]},"_npmUser":{"name":"bconnorwhite","email":"connor.bcw@gmail.com"},"directories":{},"maintainers":[{"name":"bconnorwhite","email":"connor.bcw@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/read-boolean_1.0.0_1625197006991_0.7190188519177017"},"_hasShrinkwrap":false},"2.0.0":{"name":"read-boolean","version":"2.0.0","description":"A simple utility for parsing boolean values from strings.","license":"MIT","private":false,"author":{"name":"Connor White"},"contributors":[{"name":"Connor White"}],"homepage":"https://github.com/bconnorwhite/read-boolean#readme","repository":{"type":"git","url":"git+https://github.com/bconnorwhite/read-boolean.git"},"bugs":{"url":"https://github.com/bconnorwhite/read-boolean/issues"},"keywords":["read","parse","boolean","string","to","convert","cast"],"type":"module","main":".auto/build/index.js","exports":"./.auto/build/index.js","types":".auto/build/index.d.ts","engines":{"node":"^14.13.1 || >=16.0.0"},"scripts":{"build":"auto build","dev":"auto dev","lint":"auto lint","prepack":"yarn build","release":"auto release","test":"auto test","typecheck":"auto typecheck"},"devDependencies":{"autorepo":"^0.1.9"},"eslintConfig":{"extends":"@autosoft/eslint-config"},"jest":{"preset":"@autosoft/jest-preset"},"npmpackagejsonlint":{"extends":"npm-package-json-lint-config-auto"},"_id":"read-boolean@2.0.0","dist":{"shasum":"5571b48edc5322f617cf9ea062030f2a5dd2f8b3","integrity":"sha512-ktat53X5VSkC+t4e1p0k7WWulG7BGCxq2Pw4D0NClK/+qF3erJmPIzZtHIWRof466+Awc+0i96dUP5TuF5TwEQ==","tarball":"https://registry.npmjs.org/read-boolean/-/read-boolean-2.0.0.tgz","fileCount":8,"unpackedSize":6405,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD69QS4TlbenA8H2Cl9iiGJsJliV8mI4z4vaHpjVkfbpgIgXfgTT46pjj/PsehqBaTPuVwCvMsxDk0h4HyZxIDXWeg="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjvdkQACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoaxBAAlWJkNAocd29cvHGEBcU3DaCtbt00cnfRcgeqa8JjhmxMxZvE\r\n2sZ1YCKjQCwQHF1xTcY8Goi2J6lnFo9cDfYdrctnKcYMv1xr3/243CgMmfJg\r\nGKn5RCJitRuy8LA2KNhSXKhNvdqag033aO8dRkBYsIv3Wa4HfJmG3Ai+ZXED\r\nnxfUb4+nBq4ed5MD09zSLKKX+3QLpf4wNlUpeuxEhy/1s7eCTUUPL/QovjK1\r\nPy86+0oy8Qqh67slliEX0TH6Cm9g+Ltlq8hpsyIVy2bJTOD0VCopPxUw4CAH\r\ngIYKaQSccftmn+CNCLLp8Jtx86m9+Un0aKt2Lrg48vBZz8wX7BqC5ZbaKtra\r\nZocxbnixWvhEyp8DcN8u8wPCo6tefe4vNHTubZ52R/kcR2Uqim3ETAb5TRiT\r\nK13RUtJ9zc6StnqcZB3xsysdjeHEcfNnrSYy00uNm4n5DN4SqQP/n5Q+jfhv\r\ntmy3a+FXHmO2XXdhgD7fZC888ZHuommkaAE+Dv7K5jXl9Qz27Z2s+caKiVIo\r\n9bW+FjkGGj8A5shSYRI1b0tRm0dexjKFG5QtuvsJSa1FrK8USiQD8FUSMxb9\r\nceCsa83oF1PJFPaNpF8TF7OSiAgs8ipY55p9rS4fi80g6ESlpFE+uci9Hbuc\r\nI2L/aHDjcDObUQZwCFEyRNEqsudhMlLf8so=\r\n=mJba\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bconnorwhite","email":"connor.bcw@gmail.com"},"directories":{},"maintainers":[{"name":"bconnorwhite","email":"connor.bcw@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/read-boolean_2.0.0_1673386255945_0.7319563856149875"},"_hasShrinkwrap":false}},"time":{"created":"2021-07-02T03:36:46.991Z","1.0.0":"2021-07-02T03:36:47.120Z","modified":"2023-01-10T21:30:56.235Z","2.0.0":"2023-01-10T21:30:56.134Z"},"maintainers":[{"name":"bconnorwhite","email":"connor.bcw@gmail.com"}],"description":"A simple utility for parsing boolean values from strings.","homepage":"https://github.com/bconnorwhite/read-boolean#readme","keywords":["read","parse","boolean","string","to","convert","cast"],"repository":{"type":"git","url":"git+https://github.com/bconnorwhite/read-boolean.git"},"author":{"name":"Connor White"},"license":"MIT","readme":"<!--BEGIN HEADER-->\n<div id=\"top\" align=\"center\">\n  <h1>read-boolean</h1>\n  <a href=\"https://npmjs.com/package/read-boolean\">\n    <img alt=\"NPM\" src=\"https://img.shields.io/npm/v/read-boolean.svg\">\n  </a>\n  <a href=\"https://github.com/bconnorwhite/read-boolean\">\n    <img alt=\"TypeScript\" src=\"https://img.shields.io/github/languages/top/bconnorwhite/read-boolean.svg\">\n  </a>\n  <a href=\"https://coveralls.io/github/bconnorwhite/read-boolean?branch=master\">\n    <img alt=\"Coverage Status\" src=\"https://img.shields.io/coveralls/github/bconnorwhite/read-boolean.svg?branch=master\">\n  </a>\n</div>\n\n<br />\n\n<blockquote align=\"center\">A simple utility for parsing boolean values from strings.</blockquote>\n\n<br />\n\n_If I should maintain this repo, please ⭐️_\n<a href=\"https://github.com/bconnorwhite/read-boolean\">\n  <img align=\"right\" alt=\"GitHub stars\" src=\"https://img.shields.io/github/stars/bconnorwhite/read-boolean?label=%E2%AD%90%EF%B8%8F&style=social\">\n</a>\n\n_DM me on [Twitter](https://twitter.com/bconnorwhite) if you have questions or suggestions._\n<a href=\"https://twitter.com/bconnorwhite\">\n  <img align=\"right\" alt=\"Twitter\" src=\"https://img.shields.io/twitter/url?label=%40bconnorwhite&style=social&url=https%3A%2F%2Ftwitter.com%2Fbconnorwhite\">\n</a>\n\n---\n<!--END HEADER-->\n\n## About\n\n## Installation\n\n```sh\nyarn add read-boolean\n```\n\n```sh\nnpm install read-boolean\n```\n\n```sh\npnpm add read-boolean\n```\n\n## Usage\n\n```ts\nimport { readBoolean } from \"read-boolean\";\n\nreadBoolean(\"true\"); // true\nreadBoolean(\"false\"); // false\nreadBoolean(\"maybe\"); // undefined\nreadBoolen(undefined); // undefined\n```\n\n### Options\n\nAn options argument is also provided, which allows for more control over the parsing.\n\nIf `extended` is set to true, the following list of values will be accepted:\n```json\n[\"true\", \"t\", \"yes\", \"y\", \"1\"]\n[\"false\", \"f\", \"no\", \"n\", \"0\"]\n```\nIf `strict` is set to true, values must match exactly. Otherwise, the value will be converted to lowercase before being compared.\n\n```ts\nreadBoolean(\"yes\", { extended: true }); // true\nreadBoolean(\"no\", { extended: true }); // false\n\nreadBoolean(\"true\", { strict: true }); // true\nreadBoolean(\"TRUE\", { strict: true }); // undefined\n\nreadBoolean(\"yes\", { strict: true, extended: true }); // true\nreadBoolean(\"YES\", { strict: true, extended: true }); // undefined\n```\n\n<!--BEGIN FOOTER-->\n\n<br />\n\n<h2>Dev Dependencies</h2>\n\n- [autorepo](https://www.npmjs.com/package/autorepo): Autorepo abstracts away your dev dependencies, providing a single command to run all of your scripts.\n\n\n<br />\n\n<h2 id=\"license\">License <a href=\"https://opensource.org/licenses/MIT\"><img align=\"right\" alt=\"license\" src=\"https://img.shields.io/npm/l/read-boolean.svg\"></a></h2>\n\n[MIT](https://opensource.org/licenses/MIT) - _MIT License_\n<!--END FOOTER-->\n","readmeFilename":"README.md","contributors":[{"name":"Connor White"}],"bugs":{"url":"https://github.com/bconnorwhite/read-boolean/issues"}}