{"id":15680889,"url":"https://github.com/silverwind/ip-bigint","last_synced_at":"2026-05-17T06:05:03.546Z","repository":{"id":57146271,"uuid":"195659024","full_name":"silverwind/ip-bigint","owner":"silverwind","description":"Convert IPv4 and IPv6 addresses to and from BigInt","archived":false,"fork":false,"pushed_at":"2026-05-07T00:52:23.000Z","size":1035,"stargazers_count":13,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-05-07T02:14:06.326Z","etag":null,"topics":["bigint","ip-address","javascript","module"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/silverwind.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2019-07-07T14:10:57.000Z","updated_at":"2026-05-07T00:52:27.000Z","dependencies_parsed_at":"2023-01-29T16:30:28.441Z","dependency_job_id":null,"html_url":"https://github.com/silverwind/ip-bigint","commit_stats":{"total_commits":58,"total_committers":1,"mean_commits":58.0,"dds":0.0,"last_synced_commit":"cf9aec7c542bc189ce08a6ba9cb6f0bb8a1dcc19"},"previous_names":[],"tags_count":49,"template":false,"template_full_name":null,"purl":"pkg:github/silverwind/ip-bigint","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silverwind%2Fip-bigint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silverwind%2Fip-bigint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silverwind%2Fip-bigint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silverwind%2Fip-bigint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/silverwind","download_url":"https://codeload.github.com/silverwind/ip-bigint/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silverwind%2Fip-bigint/sbom","scorecard":{"id":824106,"data":{"date":"2025-08-11","repo":{"name":"github.com/silverwind/ip-bigint","commit":"a06321e694b08f73c2cd7ffd152164fc52ce76d2"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.5,"checks":[{"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":"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":"Maintained","score":1,"reason":"2 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 1","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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/silverwind/ip-bigint/ci.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/silverwind/ip-bigint/ci.yaml/master?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction 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":"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yaml: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":"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":"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: BSD 2-Clause \"Simplified\" 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":10,"reason":"0 existing vulnerabilities detected","details":null,"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-23T16:16:06.539Z","repository_id":57146271,"created_at":"2025-08-23T16:16:06.539Z","updated_at":"2025-08-23T16:16:06.539Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33129101,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T18:38:32.183Z","status":"online","status_checked_at":"2026-05-17T02:00:05.366Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["bigint","ip-address","javascript","module"],"created_at":"2024-10-03T16:45:45.008Z","updated_at":"2026-05-17T06:05:03.509Z","avatar_url":"https://github.com/silverwind.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ip-bigint\n[![](https://img.shields.io/npm/v/ip-bigint.svg?style=flat)](https://www.npmjs.org/package/ip-bigint) [![](https://img.shields.io/npm/dm/ip-bigint.svg)](https://www.npmjs.org/package/ip-bigint) [![](https://img.shields.io/bundlephobia/minzip/ip-bigint.svg)](https://bundlephobia.com/package/ip-bigint) [![](https://packagephobia.com/badge?p=ip-bigint)](https://packagephobia.com/result?p=ip-bigint) [![](https://depx.co/api/badge/ip-bigint)](https://depx.co/pkg/ip-bigint)\n\n\u003e Convert IPv4 and IPv6 addresses to and from BigInt. Compliant with [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952) and [RFC 4291](https://datatracker.ietf.org/doc/html/rfc4291).\n\n## Usage\n\n```js\nimport {parseIp, stringifyIp, normalizeIp} from \"ip-bigint\";\n\nconst parsedIp = parseIp(\"2001:db8::\");\n// =\u003e {number: 42540766411282592856903984951653826560n, version: 6}\n\nstringifyIp(parsedIp);\n// =\u003e \"2001:db8::\"\n\nnormalizeIp(\"2001:db8::0:0:1\");\n// =\u003e \"2001:db8::1\"\n```\n\n## API\n\n### parseIp(ip: string)\n\nParse an IP address string to a `ParsedIP` object.\n\nFor IPv4 returns `{number, version}`.\nFor IPv6 returns `{number, version, [ipv4mapped], [scopeid]}`.\n\nThere is only rudimentary validation that the passed string is actually an IP address. You are encouraged to validate yourself using modules like [`ip-regex`](https://github.com/sindresorhus/ip-regex).\n\n### stringifyIp({number, version, [ipv4mapped], [scopeid]}: ParsedIP, opts?: StringifyOpts)\n\nConvert a `ParsedIP` object back to an IP address string.\n\n`opts`: Options `StringifyOpts`\n  - `compress`: boolean - Whether to compress the IP. For IPv6, this means the \"best representation\" all-lowercase shortest possible form. Default: `true`.\n  - `hexify`: boolean - Whether to convert IPv4-Mapped IPv6 addresses to hex. Default: `false`.\n  - `mapv4`: boolean - Whether to convert IPv4-Mapped IPv6 addresses (e.g. `::ffff:127.0.0.1`) to plain IPv4 (e.g. `127.0.0.1`). Default: `false`.\n\n### normalizeIp(ip: string, opts?: StringifyOpts)\n\nRound-trip an IP address through `parseIp` and `stringifyIp`, effectively normalizing its representation.\n\n`opts`: Options `StringifyOpts`\n  - `compress`: boolean - Whether to compress the IP. For IPv6, this means the \"best representation\" all-lowercase shortest possible form. Default: `true`.\n  - `hexify`: boolean - Whether to convert IPv4-Mapped IPv6 addresses to hex. Default: `false`.\n  - `mapv4`: boolean - Whether to convert IPv4-Mapped IPv6 addresses (e.g. `::ffff:127.0.0.1`) to plain IPv4 (e.g. `127.0.0.1`). Default: `false`.\n\n### max4\n\nA `bigint` value that holds the biggest possible IPv4 address.\n\n### max6\n\nA `bigint` value that holds the biggest possible IPv6 address.\n\n### ipVersion(ip: string)\n\nReturns a integer of the IP version, 4, 6 or 0 if it's not an IP. Very rudimentary and should not be used for validation.\n\n## Related\n\n- [ip-regex](https://github.com/sindresorhus/ip-regex) - Regular expression for matching IP addresses\n- [is-cidr](https://github.com/silverwind/is-cidr) - Check if a string is an IP address in CIDR notation\n- [is-ip](https://github.com/sindresorhus/is-ip) - Check if a string is an IP address\n- [cidr-regex](https://github.com/silverwind/cidr-regex) - Regular expression for matching IP addresses in CIDR notation\n- [cidr-tools](https://github.com/silverwind/cidr-tools) - Tools to work with IPv4 and IPv6 CIDR network lists\n\n## License\n\n© [silverwind](https://github.com/silverwind), distributed under BSD licence\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsilverwind%2Fip-bigint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsilverwind%2Fip-bigint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsilverwind%2Fip-bigint/lists"}