{"id":41775441,"url":"https://github.com/gemini86/bitunloader","last_synced_at":"2026-01-25T03:27:33.407Z","repository":{"id":36921340,"uuid":"230966084","full_name":"gemini86/bitunloader","owner":"gemini86","description":"Unload number to a binary string array of bits, array of bools, object of bits, object of bools.","archived":false,"fork":false,"pushed_at":"2023-03-03T11:29:08.000Z","size":146,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-28T02:25:19.388Z","etag":null,"topics":["binary","bit","bool","modbus","parse","unpack","word"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gemini86.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-12-30T19:05:30.000Z","updated_at":"2022-05-17T18:14:11.000Z","dependencies_parsed_at":"2023-01-17T07:14:03.695Z","dependency_job_id":null,"html_url":"https://github.com/gemini86/bitunloader","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/gemini86/bitunloader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gemini86%2Fbitunloader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gemini86%2Fbitunloader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gemini86%2Fbitunloader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gemini86%2Fbitunloader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gemini86","download_url":"https://codeload.github.com/gemini86/bitunloader/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gemini86%2Fbitunloader/sbom","scorecard":{"id":422021,"data":{"date":"2025-08-11","repo":{"name":"github.com/gemini86/bitunloader","commit":"e8cb7d23913bcb6b45da67757f5f1ace8a874eac"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.4,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/12 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":3,"reason":"dependency not pinned by hash detected -- score normalized to 3","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/gemini86/bitunloader/nodejs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/gemini86/bitunloader/nodejs.yml/master?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   1 out of   1 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/nodejs.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"11 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-2j2x-2gpw-g8fm","Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh","Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 24 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-19T01:27:52.638Z","repository_id":36921340,"created_at":"2025-08-19T01:27:52.638Z","updated_at":"2025-08-19T01:27:52.638Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28742975,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T02:46:29.005Z","status":"ssl_error","status_checked_at":"2026-01-25T02:44:29.968Z","response_time":113,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["binary","bit","bool","modbus","parse","unpack","word"],"created_at":"2026-01-25T03:27:33.316Z","updated_at":"2026-01-25T03:27:33.401Z","avatar_url":"https://github.com/gemini86.png","language":"JavaScript","readme":"# bitunloader\n`v1.2.1`\n\nUnload a number to a binary string array of bits, array of bools, object of bits, object of bools.\nVery usefull when working with modbus devices which use word data types. Often, modbus device manufactures use a single 16 bit word to represent up to 16 different boolean values according to the individual bits in the word. Accessing those individual bits is made easier by transforming the word into individual bits in a way what matches your coding style.\n\n## New:\n* Added a mode to handle signed 16 bit numbers. Does not change previous behaviour [*See examples*](#examples).\n\n[![alt text](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png \"Buy me a coffee!\")](https://www.buymeacoffee.com/NxcwUpD)\n\n## Installation:\n`npm install bitunloader`\n## Use:\nbitunloader accepts two arguments:\n### 1) Input to be converted.  *(required)*\n* Must be a whole integer or string which can be parsed into an integer using parseInt().\n* Can only handle positive numbers, negative numbers will be made positive.\n### 2) Object to specify the format your input number will be converted to. *(optional)*\n* Must be an object\n* Object must contain property `mode` which must be `string`, `array` or `object`.\n* If using Array or Object mode, an additional property `type` is required which must be `bit` or `bool`.\n* `padding` property sets the length of the result output to *at least* this length.\n\t* Must be a whole integer or string which can be parsed into an integer using parseInt().\n\t* Can only handle positive numbers, negative numbers will be made positive.\n\t* A result output that has a bit length that is longer than the padding option size will not be altered by the padding option. [*see examples*](#examples)\n* `signed` property invokes 'signed integer mode', which automatically pads the result to 16 bits. The least significant bit becomes the sign bit, which allows a value range between -32,767 (sign bit = 1) and +32,767 (sign bit = 0). Inputting values larger than this range will result in an error.\n\t* Must be `true` or `false`.\n\t* Default is `false`.\n## Examples\n##### Example inputs:\n\t5000 //is used as-is.\n\t9987.3445 //decimal is dropped to result in `9987`.\n\t'814' //string is parsed to `814`\n\t-6000 //must be used with option argument set to {signed: true} or it will be made positive by default.\n##### Example Modes:\nString mode:\n\n`bitunloader(5, {mode: 'string'}); //result will be '101'`\n\nOr simply:\n\n\tbitunloader(100); //result will be '1100100'\n\nArray mode:\n\n\tbitunloader(3, {mode: 'array', type: 'bit'})\n\t//result will be [1,1]\n\nObject mode:\n\n\tbitunloader(2, {mode: 'object', type: 'bool'})\n\t//result will be {b0: false, b1: true}\n\nSigned mode: *(can be used with any other mode)*\n\n\tbitunloader(-5, {signed: true});\n\t//result will be '1000000000000101'\n\n### Example optional padding:\nPad to 16 bits:\n\n\tbitunloader(1277, {mode: 'string', padding: 16})\n\t//result will be ''0000010011111101'\n\nPad to 8 bits on a 17 bit number:\n\n\tbitunloader(69420, {padding: 8})\n\t//result will be '10000111100101100' (still 17 bits long)\n","funding_links":["https://www.buymeacoffee.com/NxcwUpD"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgemini86%2Fbitunloader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgemini86%2Fbitunloader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgemini86%2Fbitunloader/lists"}