{"id":24719705,"url":"https://github.com/lionralfs/boolopt","last_synced_at":"2025-03-22T11:43:39.937Z","repository":{"id":36460792,"uuid":"225076511","full_name":"lionralfs/boolopt","owner":"lionralfs","description":"A tiny package to get and set boolean options using bitwise operations","archived":false,"fork":false,"pushed_at":"2024-05-02T02:25:18.000Z","size":790,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-23T09:13:13.142Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/lionralfs.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-11-30T22:16:08.000Z","updated_at":"2023-03-10T09:05:24.000Z","dependencies_parsed_at":"2023-01-17T01:40:37.215Z","dependency_job_id":"dd163e75-f038-4214-b8be-8d18dc1b20ca","html_url":"https://github.com/lionralfs/boolopt","commit_stats":{"total_commits":31,"total_committers":3,"mean_commits":"10.333333333333334","dds":0.4516129032258065,"last_synced_commit":"d7ee419ae2ca3165369c4e335ce792bf2d71360e"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lionralfs%2Fboolopt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lionralfs%2Fboolopt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lionralfs%2Fboolopt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lionralfs%2Fboolopt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lionralfs","download_url":"https://codeload.github.com/lionralfs/boolopt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244795519,"owners_count":20511521,"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":"2025-01-27T11:19:25.276Z","updated_at":"2025-03-22T11:43:39.917Z","avatar_url":"https://github.com/lionralfs.png","language":"JavaScript","readme":"# boolopt (boolean options)\n\nA tiny package to get and set boolean options using bitwise operations.\n\n## Installation\n\n```bash\nnpm install --save boolopt\n```\n\n## Usage\n\nCalling boolopt returns an object with the methods `get` and `set` on it.\n\n```js\nimport boolopt from 'boolopt';\n\n// initialize the values (omitting them sets them to 0)\nconst { get, set } = boolopt(false, false, true);\n\n// you can now access them by index\nget(0); // false\nget(1); // false\nget(2); // true\n\nset(1, true);\n\nget(1); // true\n```\n\nIt combines nicely with enums:\n\n```js\nconst OPTIONS = Object.freeze({ HUNGRY: 0, TIRED: 1 });\n\nconst { get, set } = boolopt();\n\nset(OPTIONS.HUNGRY, true);\nset(OPTIONS.TIRED, true);\n```\n\n## License\n\n[MIT](LICENSE) © Lion Ralfs\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flionralfs%2Fboolopt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flionralfs%2Fboolopt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flionralfs%2Fboolopt/lists"}