{"id":15690589,"url":"https://github.com/linusu/is-my-ip-valid","last_synced_at":"2025-05-06T21:05:41.903Z","repository":{"id":57277389,"uuid":"121512672","full_name":"LinusU/is-my-ip-valid","owner":"LinusU","description":"A small lib to validate IP addresses","archived":false,"fork":false,"pushed_at":"2022-03-01T16:21:50.000Z","size":26,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-06T21:02:28.096Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LinusU.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}},"created_at":"2018-02-14T13:16:47.000Z","updated_at":"2022-03-01T19:24:24.000Z","dependencies_parsed_at":"2022-09-10T22:51:54.377Z","dependency_job_id":null,"html_url":"https://github.com/LinusU/is-my-ip-valid","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/LinusU%2Fis-my-ip-valid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinusU%2Fis-my-ip-valid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinusU%2Fis-my-ip-valid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinusU%2Fis-my-ip-valid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LinusU","download_url":"https://codeload.github.com/LinusU/is-my-ip-valid/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252769396,"owners_count":21801376,"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-03T18:12:27.079Z","updated_at":"2025-05-06T21:05:41.798Z","avatar_url":"https://github.com/LinusU.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Is my IP valid\n\nA small lib to validate IP addresses.\n\n## Installation\n\n```sh\nnpm install --save is-my-ip-valid\n```\n\n## Usage\n\n```js\nconst validator = require('is-my-ip-valid')\nconst validate = validator()\nconst validate4 = validator({ version: 4 })\nconst validate6 = validator({ version: 6 })\n\nconsole.log(validate('127.0.0.1'))\n//=\u003e true\n\nconsole.log(validate4('127.0.0.1'))\n//=\u003e true\n\nconsole.log(validate6('127.0.0.1'))\n//=\u003e false\n\nconsole.log(validate('2001:0db8:85a3:0000:0000:8a2e:0370:7334'))\n//=\u003e true\n\nconsole.log(validate4('2001:0db8:85a3:0000:0000:8a2e:0370:7334'))\n//=\u003e false\n\nconsole.log(validate6('2001:0db8:85a3:0000:0000:8a2e:0370:7334'))\n//=\u003e true\n```\n\n## Acknowledgements\n\nThe code is mostly based on this wonderful library: [beaugunderson/ip-address](https://github.com/beaugunderson/ip-address)\n\nAll regexes used are audited for catastrophic backtracking by this module: [substack/safe-regex](https://github.com/substack/safe-regex)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinusu%2Fis-my-ip-valid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinusu%2Fis-my-ip-valid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinusu%2Fis-my-ip-valid/lists"}