{"id":19425485,"url":"https://github.com/nodef/extra-integer","last_synced_at":"2026-01-18T16:31:28.540Z","repository":{"id":41508602,"uuid":"133167597","full_name":"nodef/extra-integer","owner":"nodef","description":"A 32-bit integer can store values from -2^31 to 2^31 - 1.","archived":false,"fork":false,"pushed_at":"2025-04-08T16:40:49.000Z","size":350,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-17T08:05:26.274Z","etag":null,"topics":["32bit","abs","bit","extra","integer","is","is-pow-2","log-10","log-2","next-pow-2","pow-10","pow-2","prev-pow-2","sign-equal"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/extra-integer","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/nodef.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-05-12T17:18:10.000Z","updated_at":"2025-04-08T16:40:49.000Z","dependencies_parsed_at":"2025-04-12T06:58:56.665Z","dependency_job_id":"4e83c858-f656-4a67-b144-cb4fbe088173","html_url":"https://github.com/nodef/extra-integer","commit_stats":{"total_commits":129,"total_committers":1,"mean_commits":129.0,"dds":0.0,"last_synced_commit":"a0c1db2c1661343f7544fb4d1822143b530ef69e"},"previous_names":["nodef/integer-extra"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/nodef/extra-integer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodef%2Fextra-integer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodef%2Fextra-integer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodef%2Fextra-integer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodef%2Fextra-integer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nodef","download_url":"https://codeload.github.com/nodef/extra-integer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodef%2Fextra-integer/sbom","scorecard":{"id":692421,"data":{"date":"2025-08-11","repo":{"name":"github.com/nodef/extra-integer","commit":"facbf730d6db4fec7b1e50485eb633b673f93a39"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.1,"checks":[{"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":"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":"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/30 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":"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":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Warn: no topLevel permission defined: .github/workflows/pr.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":"Pinned-Dependencies","score":4,"reason":"dependency not pinned by hash detected -- score normalized to 4","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/nodef/extra-integer/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/nodef/extra-integer/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:40: update your workflow using https://app.stepsecurity.io/secureworkflow/nodef/extra-integer/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/nodef/extra-integer/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:46: update your workflow using https://app.stepsecurity.io/secureworkflow/nodef/extra-integer/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:47: update your workflow using https://app.stepsecurity.io/secureworkflow/nodef/extra-integer/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:57: update your workflow using https://app.stepsecurity.io/secureworkflow/nodef/extra-integer/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:58: update your workflow using https://app.stepsecurity.io/secureworkflow/nodef/extra-integer/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:61: update your workflow using https://app.stepsecurity.io/secureworkflow/nodef/extra-integer/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:72: update your workflow using https://app.stepsecurity.io/secureworkflow/nodef/extra-integer/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:73: update your workflow using https://app.stepsecurity.io/secureworkflow/nodef/extra-integer/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:76: update your workflow using https://app.stepsecurity.io/secureworkflow/nodef/extra-integer/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pr.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/nodef/extra-integer/pr.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pr.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/nodef/extra-integer/pr.yml/master?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/ci.yml:63","Warn: npmCommand not pinned by hash: .github/workflows/ci.yml:80","Info:   0 out of  10 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   4 third-party GitHubAction dependencies pinned","Info:   5 out of   7 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":"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":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"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":4,"reason":"6 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-h5c3-5r3r-rr8q","Warn: Project is vulnerable to: GHSA-rmvr-2pp2-xj38","Warn: Project is vulnerable to: GHSA-xx4v-prfh-6cgc","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-22T02:35:57.412Z","repository_id":41508602,"created_at":"2025-08-22T02:35:57.412Z","updated_at":"2025-08-22T02:35:57.412Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28541543,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T14:59:57.589Z","status":"ssl_error","status_checked_at":"2026-01-18T14:59:46.540Z","response_time":98,"last_error":"SSL_read: 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":["32bit","abs","bit","extra","integer","is","is-pow-2","log-10","log-2","next-pow-2","pow-10","pow-2","prev-pow-2","sign-equal"],"created_at":"2024-11-10T14:03:37.150Z","updated_at":"2026-01-18T16:31:28.503Z","avatar_url":"https://github.com/nodef.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"A [32-bit integer] can store values from `-2^31` to `2^31 - 1`.\u003cbr\u003e\n📦 [Node.js](https://www.npmjs.com/package/extra-integer),\n🌐 [Web](https://www.npmjs.com/package/extra-integer.web),\n📜 [Files](https://unpkg.com/extra-integer/),\n📰 [Docs](https://nodef.github.io/extra-integer/),\n📘 [Wiki](https://github.com/nodef/extra-integer/wiki/).\n\nThis package deals with the manipulation of **32-bit integers** in JavaScript,\nwhich can store values ranging from `-2^31` ([MIN_VALUE]) to `2^31 - 1`\n([MAX_VALUE]). JavaScript converts a `Number` (a *64-bit floating point number*)\nto a *32-bit integer* (`int32`) when bitwise operators (such as `|`) are\napplied.\n\nUse [is] to check is a number can be represented as a *32-bit integer*.\n**Sign**-based operations include [abs] and [signEqual]. **Power/logarithm**\nrelated operations include [isPow2], [prevPow2], [nextPow2], [pow2], [pow10],\n[log2], and [log10].\n\nThis package is available in *Node.js* and *Web* formats. To use it on the web,\nsimply use the `extra_integer` global variable after loading with a `\u003cscript\u003e`\ntag from the [jsDelivr CDN].\n\n\u003e Stability: [Experimental](https://www.youtube.com/watch?v=L1j93RnIxEo).\n\n[32-bit integer]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Bitwise_Operators\n[jsDelivr CDN]: https://cdn.jsdelivr.net/npm/extra-integer.web/index.js\n\n\u003cbr\u003e\n\n```javascript\nconst xinteger = require('extra-integer');\n// import * as xinteger from \"extra-integer\";\n// import * as xinteger from \"https://unpkg.com/extra-integer/index.mjs\"; (deno)\n\nxinteger.is(9.11e-31);\n// → false\n\nxinteger.log10(10000);\n// → 4\n\nxinteger.nextPow2(63);\n// → 64\n```\n\n\u003cbr\u003e\n\u003cbr\u003e\n\n\n## Index\n\n| Property | Description |\n|  ----  |  ----  |\n| [MIN_VALUE] | Minimum int32 value. |\n| [MAX_VALUE] | Maximum int32 value. |\n|  |  |\n| [is] | Check if value is int32. |\n|  |  |\n| [abs] | Get the absolute of an int32. |\n| [signEqual] | Check if two int32s have equal sign. |\n|  |  |\n| [isPow2] | Check if int32 is a power-of-2. |\n| [prevPow2] | Find previous power-of-2 of an int32. |\n| [nextPow2] | Find next power-of-2 of an int32. |\n| [pow2] | Find the power-of-2 of an int32. |\n| [pow10] | Find the power-of-10 of an int32. |\n| [log2] | Find the base-2 logarithm of an int32. |\n| [log10] | Find the base-10 logarithm of an int32. |\n\n\u003cbr\u003e\n\u003cbr\u003e\n\n\n## References\n\n- [Bit Twiddling Hacks by Sean Eron Anderson](https://graphics.stanford.edu/~seander/bithacks.html)\n- [bit-twiddle package by @mikolalysenko](https://www.npmjs.com/package/bit-twiddle)\n\n\n\u003cbr\u003e\n\u003cbr\u003e\n\n\n[![](https://img.youtube.com/vi/EK32jo7i5LQ/maxresdefault.jpg)](https://www.youtube.com/watch?v=EK32jo7i5LQ)\u003cbr\u003e\n[![ORG](https://img.shields.io/badge/org-nodef-green?logo=Org)](https://nodef.github.io)\n[![DOI](https://zenodo.org/badge/133167597.svg)](https://zenodo.org/badge/latestdoi/133167597)\n[![Coverage Status](https://coveralls.io/repos/github/nodef/extra-integer/badge.svg?branch=master)](https://coveralls.io/github/nodef/extra-integer?branch=master)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/d9c12df80ca4add5422e/test_coverage)](https://codeclimate.com/github/nodef/extra-integer/test_coverage)\n[![Maintainability](https://api.codeclimate.com/v1/badges/d9c12df80ca4add5422e/maintainability)](https://codeclimate.com/github/nodef/extra-integer/maintainability)\n![](https://ga-beacon.deno.dev/G-RC63DPBH3P:SH3Eq-NoQ9mwgYeHWxu7cw/github.com/nodef/extra-integer)\n\n\n[MIN_VALUE]: https://github.com/nodef/extra-integer/wiki/MIN_VALUE\n[MAX_VALUE]: https://github.com/nodef/extra-integer/wiki/MAX_VALUE\n[is]: https://github.com/nodef/extra-integer/wiki/is\n[signEqual]: https://github.com/nodef/extra-integer/wiki/signEqual\n[abs]: https://github.com/nodef/extra-integer/wiki/abs\n[isPow2]: https://github.com/nodef/extra-integer/wiki/isPow2\n[prevPow2]: https://github.com/nodef/extra-integer/wiki/prevPow2\n[nextPow2]: https://github.com/nodef/extra-integer/wiki/nextPow2\n[pow2]: https://github.com/nodef/extra-integer/wiki/pow2\n[pow10]: https://github.com/nodef/extra-integer/wiki/pow10\n[log2]: https://github.com/nodef/extra-integer/wiki/log2\n[log10]: https://github.com/nodef/extra-integer/wiki/log10\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnodef%2Fextra-integer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnodef%2Fextra-integer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnodef%2Fextra-integer/lists"}