{"id":28195754,"url":"https://github.com/rohmanhm/force-boolean","last_synced_at":"2025-05-16T14:14:22.691Z","repository":{"id":38271784,"uuid":"81444783","full_name":"rohmanhm/force-boolean","owner":"rohmanhm","description":"🔨 Forced transform your variable into a boolean without worried.","archived":false,"fork":false,"pushed_at":"2023-01-06T01:40:56.000Z","size":1067,"stargazers_count":6,"open_issues_count":13,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-05T14:03:33.958Z","etag":null,"topics":["boolean","javascript","library","transform"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/rohmanhm.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-02-09T11:47:25.000Z","updated_at":"2024-05-30T14:59:35.000Z","dependencies_parsed_at":"2023-02-05T01:46:44.336Z","dependency_job_id":null,"html_url":"https://github.com/rohmanhm/force-boolean","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rohmanhm%2Fforce-boolean","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rohmanhm%2Fforce-boolean/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rohmanhm%2Fforce-boolean/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rohmanhm%2Fforce-boolean/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rohmanhm","download_url":"https://codeload.github.com/rohmanhm/force-boolean/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254544822,"owners_count":22088808,"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":["boolean","javascript","library","transform"],"created_at":"2025-05-16T14:14:21.923Z","updated_at":"2025-05-16T14:14:22.679Z","avatar_url":"https://github.com/rohmanhm.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Force Boolean\n[![Greenkeeper badge](https://badges.greenkeeper.io/rohmanhm/force-boolean.svg)](https://greenkeeper.io/)\n[![Build Status](https://travis-ci.org/rohmanhm/force-boolean.svg?branch=master)](https://travis-ci.org/rohmanhm/force-boolean)\n\u003e Forced transform your variable into a boolean without worried.\n\n## How to install\n\n  * via **npm**: `npm install --save force-boolean`\n  * via **yarn**: `yarn add force-boolean`\n\n## How to use\n```javascript\n// ES6+ Babel\nimport ForceBoolean from 'force-boolean'\n// Typescript\nimport ForceBoolean from 'force-boolean'\n// CommonJS\nconst ForceBoolean = require('force-boolean').default\n\nconst YOUR_VAR = 'false'\nconsole.log(ForceBoolean(YOUR_VAR)) // it's return boolean false\n```\n\n## Test\n- [x] return false if value is number 0\n- [x] return false if value is string '0'\n- [x] return false if value is string 'false'\n- [x] return false if value is boolean false\n- [x] return false if value is undefined\n- [x] return false if value is null\n- [x] return true if value is number 1\n- [x] return true if value is string '1'\n- [x] return true if value is string 'true'\n- [x] return true if value is boolean true\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frohmanhm%2Fforce-boolean","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frohmanhm%2Fforce-boolean","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frohmanhm%2Fforce-boolean/lists"}