{"id":21916519,"url":"https://github.com/cloudnode-pro/ip","last_synced_at":"2026-02-28T12:15:05.856Z","repository":{"id":260816184,"uuid":"882002184","full_name":"cloudnode-pro/ip","owner":"cloudnode-pro","description":"IP address utility","archived":false,"fork":false,"pushed_at":"2024-11-27T09:40:53.000Z","size":147,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-27T10:31:40.273Z","etag":null,"topics":["cidr","ip","ipcalc","ipv4","ipv6","net","netmask","network","subnet"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cloudnode-pro.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-01T17:10:04.000Z","updated_at":"2024-11-27T09:40:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"1cf5386d-63bc-482a-958d-1917b02cc17d","html_url":"https://github.com/cloudnode-pro/ip","commit_stats":null,"previous_names":["cloudnode-pro/ip"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudnode-pro%2Fip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudnode-pro%2Fip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudnode-pro%2Fip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudnode-pro%2Fip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cloudnode-pro","download_url":"https://codeload.github.com/cloudnode-pro/ip/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226798043,"owners_count":17683670,"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":["cidr","ip","ipcalc","ipv4","ipv6","net","netmask","network","subnet"],"created_at":"2024-11-28T19:18:20.446Z","updated_at":"2026-02-28T12:15:05.847Z","avatar_url":"https://github.com/cloudnode-pro.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @cldn/ip\n\n[![Documentation](https://img.shields.io/badge/Documentation-blue)](https://ip.cldn.pro)\n[![GitHub](https://img.shields.io/badge/GitHub-181717?logo=github)](https://github.com/cloudnode-pro/ip)\n[![NPM](https://img.shields.io/npm/v/@cldn/ip.svg)](https://www.npmjs.com/package/@cldn/ip)\n[![Downloads](https://img.shields.io/npm/d18m/@cldn/ip.svg)](https://www.npmjs.com/package/@cldn/ip)\n[![Licence](https://img.shields.io/github/license/cloudnode-pro/ip)](https://github.com/cloudnode-pro/ip/blob/master/COPYING)\n[![CI](https://github.com/cloudnode-pro/ip/actions/workflows/ci.yml/badge.svg)](https://github.com/cloudnode-pro/ip/actions/workflows/ci.yml)\n![Coverage: 100%](https://img.shields.io/badge/coverage-100%25-brightgreen)\n\nA modern, object-oriented TypeScript library for representing and performing arithmetic on IP addresses and subnets.\n\n[**Documentation — API Reference**](https://ip.cldn.pro)\n\n## Usage\n\n### Node.js\n\nInstall with `npm`:\n\n```sh\nnpm install @cldn/ip\n```\n\nImport and use:\n\n```ts\nimport {IPv4, IPv6, Subnet} from \"@cldn/ip\";\n```\n\n### Deno\n\nImport the package from npm using the standard prefix:\n\n```ts\nimport {IPv4, IPv6, Subnet} from \"npm:@cldn/ip\";\n```\n\n### Browsers\n\nFor browser usage, it is recommended to use a bundler like [Vite](https://vitejs.dev/),\nor [Webpack](https://webpack.js.org/). If you are using a bundler, follow the same usage as for Node.js.\n\nAlternatively, you can import the library as\na [JavaScript module](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules)\nfrom [ESM\u003eCDN](https://esm.sh/):\n\n```html\n\n\u003cscript type=\"module\"\u003e\n  import {IPv4, IPv6, Subnet} from \"https://esm.sh/@cldn/ip\";\n\u003c/script\u003e\n```\n\n## Features\n\n- Object-oriented representation of IPv4 and IPv6 addresses, and subnets.\n- Comprehensive subnet arithmetic operations (e.g., containment, splitting, merging).\n- Support for CIDR notation for defining and parsing subnets.\n- Easy definition and manipulation of networks and collections of subnets.\n- Support for IPv4-mapped IPv6 addresses.\n- Fully documented, fully typed, and thoroughly tested with 100% coverage.\n- Zero dependencies; compatible with frontend and backend environments without requiring polyfills.\n\n## Example\n\n```ts\nimport {IPv4, Subnet} from \"@cldn/ip\";\n\n// Parse IPv4 address\nconst ip = IPv4.fromString(\"213.0.113.42\");\n// Or use IPAddress.fromString(\"213.0.113.42\") to parse either IPv4 or IPv6\n\n// Create subnet from CIDR notation\nconst subnet = Subnet.fromCIDR(\"213.0.113.0/24\");\n\n// Check if IP is within subnet\nconsole.log(subnet.contains(ip)); // true\n```\n\n## Contact\n\nFor bugs, or feature requests, please use [GitHub Issues](https://github.com/cloudnode-pro/ip/issues).\n\nFor real-time chat or community discussions, join our Matrix\nspace: [#community\\:cloudnode.pro](https://matrix.to/#/%23community:cloudnode.pro).\n\n## Licence\n\nCopyright © 2024–2025 Cloudnode OÜ.\n\nThis project is licensed under the terms of the [LGPL-3.0](https://github.com/cloudnode-pro/ip/blob/master/COPYING) licence.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudnode-pro%2Fip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloudnode-pro%2Fip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudnode-pro%2Fip/lists"}