{"id":28425389,"url":"https://github.com/mattcox/version","last_synced_at":"2025-10-04T05:27:53.001Z","repository":{"id":242151279,"uuid":"808811483","full_name":"mattcox/Version","owner":"mattcox","description":"A type used for storing a version number","archived":false,"fork":false,"pushed_at":"2025-05-27T13:15:36.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-05T10:50:33.341Z","etag":null,"topics":["data-type","package","spm","swift","utility"],"latest_commit_sha":null,"homepage":"","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/mattcox.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-05-31T21:51:14.000Z","updated_at":"2025-05-27T13:09:29.000Z","dependencies_parsed_at":"2024-05-31T23:41:11.215Z","dependency_job_id":"b3a797db-5170-47e0-a98c-7ca3f9b24b91","html_url":"https://github.com/mattcox/Version","commit_stats":null,"previous_names":["mattcox/version"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/mattcox/Version","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattcox%2FVersion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattcox%2FVersion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattcox%2FVersion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattcox%2FVersion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mattcox","download_url":"https://codeload.github.com/mattcox/Version/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattcox%2FVersion/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278267341,"owners_count":25958828,"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","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["data-type","package","spm","swift","utility"],"created_at":"2025-06-05T10:37:22.554Z","updated_at":"2025-10-04T05:27:52.996Z","avatar_url":"https://github.com/mattcox.png","language":"Swift","readme":"# Version\n\nA type used for storing a version number containing a major number, and an optional minor and patch number.\n\nA version can be initialized from individual version numbers.\n```swift\nVersion(1, 0, 2)    // 1.0.2\n```\n\nThe minor and patch numbers are optional.\n```swift\nVersion(1)    // 1\n```\n\nA version can also be initialized from a string.\n```swift\nVersion(\"1.2.3\")    // 1.2.3\n```\n\nThe version can be converted to a string.\n```swift\nVersion(1, 0, 2).string    // \"1.0.2\"\n```\n\nThe type also conforms to `Comparable` for comparing version numbers, and `Codable` for encoding and decoding.\n\n## Installation\n\nVersion is distributed using the [Swift Package Manager](https://swift.org/package-manager). To install it within another Swift package, add it as a dependency within your `Package.swift` manifest:\n\n```swift\nlet package = Package(\n    // . . .\n    dependencies: [\n        .package(url: \"https://github.com/mattcox/Version.git\", branch: \"main\")\n    ],\n    // . . .\n)\n```\n\nIf you’d like to use Version within an application on Apple platforms, then use Xcode’s `File \u003e Add Packages...` menu command to add it to your project.\n\nImport Version wherever you’d like to use it:\n```swift\nimport Version\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattcox%2Fversion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmattcox%2Fversion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattcox%2Fversion/lists"}