{"id":13847138,"url":"https://github.com/watson/normalize-bool","last_synced_at":"2025-08-03T03:36:56.153Z","repository":{"id":65411448,"uuid":"84924704","full_name":"watson/normalize-bool","owner":"watson","description":"Converts strings representing an on/off-state to booleans","archived":false,"fork":false,"pushed_at":"2017-03-14T08:37:28.000Z","size":3,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-12T11:56:09.946Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/watson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-14T08:32:29.000Z","updated_at":"2020-11-19T15:41:49.000Z","dependencies_parsed_at":"2023-03-20T08:47:30.887Z","dependency_job_id":null,"html_url":"https://github.com/watson/normalize-bool","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/watson%2Fnormalize-bool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/watson%2Fnormalize-bool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/watson%2Fnormalize-bool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/watson%2Fnormalize-bool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/watson","download_url":"https://codeload.github.com/watson/normalize-bool/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251645989,"owners_count":21620848,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-04T18:00:55.546Z","updated_at":"2025-04-30T05:22:50.108Z","avatar_url":"https://github.com/watson.png","language":"JavaScript","readme":"# normalize-bool\n\nConverts strings representing an on/off-state to booleans. Falsy values\nand a whitelist of keywords are converted to the boolean `false`.\nEverything else is considered `true`.\n\nUseful for normalizing environment variables and other user-input to\nbooleans.\n\n[![Build status](https://travis-ci.org/watson/normalize-bool.svg?branch=master)](https://travis-ci.org/watson/normalize-bool)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard)\n\n## Installation\n\n```\nnpm install normalize-bool --save\n```\n\n## Usage\n\n```js\nvar bool = require('normalize-bool')\n\nconsole.log(bool('no')) // =\u003e false\nconsole.log(bool('yes')) // =\u003e true\n```\n\n## API\n\n### `var bool = normalizeBool(value)`\n\nConverts the input value to a boolean. Falsy values and a whitelist of\nkeywords are converted to the boolean `false`. Everything else is\nconsidered `true`.\n\nThe following values are considered `false`:\n\n- All normal [falsy values](https://developer.mozilla.org/en-US/docs/Glossary/Falsy)\n- `'0'`\n- `'false'`\n- `'no'`\n- `'off'`\n- `'disabled'`\n\n## License\n\nMIT\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwatson%2Fnormalize-bool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwatson%2Fnormalize-bool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwatson%2Fnormalize-bool/lists"}