{"id":15293685,"url":"https://github.com/nickffox/identifierkit","last_synced_at":"2026-02-04T08:04:26.525Z","repository":{"id":56915310,"uuid":"129017353","full_name":"nickffox/IdentifierKit","owner":"nickffox","description":"Strongly typed identifiers for Swift projects","archived":false,"fork":false,"pushed_at":"2018-04-11T02:07:08.000Z","size":75,"stargazers_count":3,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-30T11:49:37.244Z","etag":null,"topics":["ios","swift","swift-framework","swift4","typesafety"],"latest_commit_sha":null,"homepage":null,"language":"Swift","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/nickffox.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-04-11T01:41:35.000Z","updated_at":"2020-11-06T14:05:08.000Z","dependencies_parsed_at":"2022-08-20T20:50:36.734Z","dependency_job_id":null,"html_url":"https://github.com/nickffox/IdentifierKit","commit_stats":null,"previous_names":["nicholasffox/identifierkit"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/nickffox/IdentifierKit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickffox%2FIdentifierKit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickffox%2FIdentifierKit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickffox%2FIdentifierKit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickffox%2FIdentifierKit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nickffox","download_url":"https://codeload.github.com/nickffox/IdentifierKit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickffox%2FIdentifierKit/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265319573,"owners_count":23746364,"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":["ios","swift","swift-framework","swift4","typesafety"],"created_at":"2024-09-30T16:50:35.094Z","updated_at":"2026-02-04T08:04:26.498Z","avatar_url":"https://github.com/nickffox.png","language":"Swift","readme":"\n![IdentifierKit](https://raw.githubusercontent.com/NicholasFFox/IdentifierKit/master/identifierkit.png)\n\nIdentifierKit allows you to easily replace `String` and `Int` identifier with strongly typed identifiers.\n\n- [Features](#features)\n- [Requirements](#requirements)\n- [Installation](#installation)\n- [Usage](#usage)\n- [Thanks](#thanks)\n- [License](#license)\n\n\n## Features\n\n- [x] 💪 Strongly typed identifiers\n- [x] 🐟 Full `Codeable` compatibility\n\n\n## Requirements\n\n\u003c!-- * iOS 8.0+ / macOS 10.10+ / tvOS 9.0+ / watchOS 2.0+ --\u003e\n* iOS 8.0+\n* Xcode 9.2+\n* Swift 4+\n\n## Installation\n\n### CocoaPods\n\n`pod 'IdentifierKit'`\n\n### Carthage\n\n`github \"NicholasFFox/IdentifierKit\"`\n\n### Swift Package Manager\n\n* Coming Soon\n\n## Usage\n\nUse IdentifierKit to replace weakly typed `String` and `Int` identifiers in your model layer with strongly typed identifier objects.\n\nStep 1: Create an unique type to represent your identifier - empty enums work great for this!\n\n```Swift\nenum UserIdentifier: Identifier {}\n```\n\nStep 2: Use a typealias to give yourself syntactic sugar and avoid typing the generic syntax everywhere.\n```Swift\ntypealias UserId = IntIdentifier\u003cUserIdentifier\u003e\n```\n\nStep 3: Replace your `Int` (or `String`) identifer with your newly created type.\n```Swift\nstruct User: Codable {\n  let id: UserId\n  let firstName: String\n  let lastName: String\n}\n``` \n\n\nIdentifierKit works seamlessly with the `Codable` protocol, so you won't have to make any changes to your existing JSON.\n\n```Swift\nlet json = \"\"\"\n{\n  \"id\": 2,\n  \"firstName\": \"Tim\",\n  \"lastName\": \"Cook\"\n}\n\"\"\".data(using: .utf8)!\n\nlet user = try JSONDecoder().decode(User.self, from: json)\n``` \n\n\n\n## Thanks\n\nThanks to [Daniel Steinberg](https://www.twitter.com/dimsumthinking) for inspiring this framework with your talk on phantom types.\n\n## License\n\nIdentifierKit is released under the MIT license. See [LICENSE](https://github.com/NicholasFFox/IdentifierKit/blob/master/LICENSE) for details.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnickffox%2Fidentifierkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnickffox%2Fidentifierkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnickffox%2Fidentifierkit/lists"}