{"id":16994624,"url":"https://github.com/znerol/ipaddrhash-js","last_synced_at":"2026-04-12T11:37:48.222Z","repository":{"id":41845893,"uuid":"406749792","full_name":"znerol/ipaddrhash-js","owner":"znerol","description":"A predictable addressing scheme for statically assigned IPv6 and IPv4 addresses based on hostnames.","archived":false,"fork":false,"pushed_at":"2022-04-26T21:00:20.000Z","size":396,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-27T06:28:03.590Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/znerol.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-09-15T12:13:46.000Z","updated_at":"2022-04-26T20:47:52.000Z","dependencies_parsed_at":"2022-08-11T19:11:01.460Z","dependency_job_id":null,"html_url":"https://github.com/znerol/ipaddrhash-js","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/znerol%2Fipaddrhash-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/znerol%2Fipaddrhash-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/znerol%2Fipaddrhash-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/znerol%2Fipaddrhash-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/znerol","download_url":"https://codeload.github.com/znerol/ipaddrhash-js/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244913005,"owners_count":20530769,"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":"2024-10-14T03:46:05.753Z","updated_at":"2026-04-12T11:37:43.181Z","avatar_url":"https://github.com/znerol.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"ipaddrhash\n==========\n\nImplements a predictable addressing scheme for statically assigned IPv6 and\nIPv4 addresses based on hostnames. Supports node and modern browsers.\n\nThe algorithm used to derive an ip is simple:\n\n    ip = prefix + (sha256(seed) \u0026 hostmask)\n\nInstallation\n------------\n\n```\nnpm install ipaddrhash --save-dev\n```\n\nUsage\n-----\n\nESM:\n\n```javascript\nimport { ipaddrHash, ipaddrPrefixSize } from \"ipaddrhash\";\n```\n\nCommonJS:\n\n```javascript\nconst { ipaddrHash, ipaddrPrefixSize } = require(\"ipaddrhash\");\n```\n\nExample:\n\n```javascript\nconst prefix = \"2001:db8::/64\";\nconst fqdn = \"example.com\";\nconst size = ipaddrPrefixSize(prefix);\nif (size !== undefined \u0026\u0026 fqdn.length \u003e 0) {\n  ipaddrHash(size, prefix, fqdn).then((result) =\u003e {\n    // should output:\n    // 2001:db8::13d2:1255:86ce:1947\n    console.log(result);\n  });\n}\n```\n\nLicense\n-------\n\nGNU General Public License v3.0 or later\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fznerol%2Fipaddrhash-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fznerol%2Fipaddrhash-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fznerol%2Fipaddrhash-js/lists"}