{"id":26010429,"url":"https://github.com/twodayslate/addressurl","last_synced_at":"2025-08-02T01:33:09.343Z","repository":{"id":45086733,"uuid":"240948507","full_name":"twodayslate/AddressURL","owner":"twodayslate","description":"Useful extension for URL to support IP and email addresses","archived":false,"fork":false,"pushed_at":"2022-08-20T02:26:31.000Z","size":17,"stargazers_count":3,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-05-01T22:11:26.515Z","etag":null,"topics":["email","ip","ipv4","ipv6","network","swift","swift-package"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/twodayslate.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-16T19:05:17.000Z","updated_at":"2024-05-01T22:11:26.515Z","dependencies_parsed_at":"2022-09-02T22:41:20.178Z","dependency_job_id":null,"html_url":"https://github.com/twodayslate/AddressURL","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twodayslate%2FAddressURL","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twodayslate%2FAddressURL/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twodayslate%2FAddressURL/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twodayslate%2FAddressURL/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/twodayslate","download_url":"https://codeload.github.com/twodayslate/AddressURL/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242117658,"owners_count":20074436,"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":["email","ip","ipv4","ipv6","network","swift","swift-package"],"created_at":"2025-03-05T22:49:56.014Z","updated_at":"2025-03-05T22:49:56.666Z","avatar_url":"https://github.com/twodayslate.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AddressURL\n\nA simple Swift Package that extends URL with some helpful functions for IP and email address\n\nRequires iOS 12.0+ since the [Network](https://developer.apple.com/documentation/network) API is used.\n\nFor domain information check out [TLDExtractSwift](https://github.com/gumob/TLDExtractSwift).\n\n## Usage\n\nIP Address can be converted to URLs\n\n```swift\nIPv4Address(\"8.8.8.8\").url.with(component: .scheme(\"https\")!.absoluteString // https://8.8.8.8\nIPv6Address(\"::\").url.with(component: .scheme(\"https\")!.absoluteString // https://[::]\n```\n\nAlternativly you can get an IP Address from a URL\n\n```swift\nlet url = URL(string: \"https://8.8.8.8\")\nurl.ipv4Address // 8.8.8.8\n\nlet url2 = URL(string: \"https://[::]\")\nurl.ipv6Address // ::\n```\n\nSpecific URLComponents can be changed\n\n```swift\nlet url = URL(string: \"https://zac.gorak.us\")\nurl.with(component: .scheme(\"ftp\") // ftp://zac.gorak.us\n```\n\nEmail addresses\n\n```swift\nlet url = URL(email: \"hello@gorak.us\")\nurl.absoluteString // mailto://hello@gorak.us\nurl.emailAddress // hello@gorak.us\n```\nEmail address parsing is handled by [EmailValidator](https://github.com/evanrobertson/EmailValidator)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftwodayslate%2Faddressurl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftwodayslate%2Faddressurl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftwodayslate%2Faddressurl/lists"}