{"id":20711121,"url":"https://github.com/cypherpoet/unitintervalpropertywrapper","last_synced_at":"2025-10-29T20:44:59.272Z","repository":{"id":63907281,"uuid":"356374069","full_name":"CypherPoet/UnitIntervalPropertyWrapper","owner":"CypherPoet","description":"A Swift Property Wrapper for automatically clamping floating-point values within a closed range of [0,1].","archived":false,"fork":false,"pushed_at":"2021-05-14T22:02:22.000Z","size":2322,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-18T12:45:00.984Z","etag":null,"topics":["input-validation","property-wrappers","swift","swift-input-validation","swift-package-manager","swift-packages","swift-property-wrapper-packages","swift-property-wrappers","swift-world-domination","unit-intervals"],"latest_commit_sha":null,"homepage":"https://cypherpoet.github.io/swift-unit-interval-property-wrapper/","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/CypherPoet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":["https://tippin.me/@cypher_poet"]}},"created_at":"2021-04-09T19:08:33.000Z","updated_at":"2024-10-15T04:41:00.000Z","dependencies_parsed_at":"2022-11-28T20:15:38.541Z","dependency_job_id":null,"html_url":"https://github.com/CypherPoet/UnitIntervalPropertyWrapper","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":"CypherPoet/swift-package-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CypherPoet%2FUnitIntervalPropertyWrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CypherPoet%2FUnitIntervalPropertyWrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CypherPoet%2FUnitIntervalPropertyWrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CypherPoet%2FUnitIntervalPropertyWrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CypherPoet","download_url":"https://codeload.github.com/CypherPoet/UnitIntervalPropertyWrapper/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242981927,"owners_count":20216503,"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":["input-validation","property-wrappers","swift","swift-input-validation","swift-package-manager","swift-packages","swift-property-wrapper-packages","swift-property-wrappers","swift-world-domination","unit-intervals"],"created_at":"2024-11-17T02:14:07.881Z","updated_at":"2025-10-29T20:44:54.238Z","avatar_url":"https://github.com/CypherPoet.png","language":"Swift","readme":"# UnitInterval: A Swift Property Wrapper\n\n\u003c!-- Header Logo --\u003e\n\n\u003c!-- \u003cdiv align=\"center\"\u003e\n   \u003cimg width=\"600px\" src=\"./Extras/banner-logo.png\" alt=\"Banner Logo\"\u003e\n\u003c/div\u003e --\u003e\n\n\n\u003c!-- Badges --\u003e\n\n\u003cp\u003e\n    \u003cimg src=\"https://img.shields.io/badge/iOS-14.0+-865EFC.svg\" /\u003e\n    \u003cimg src=\"https://img.shields.io/badge/iPadOS-14.0+-F65EFC.svg\" /\u003e\n    \u003cimg src=\"https://img.shields.io/badge/macOS-11.0+-179AC8.svg\" /\u003e\n    \u003cimg src=\"https://img.shields.io/badge/tvOS-14.0+-41465B.svg\" /\u003e\n    \u003cimg src=\"https://img.shields.io/badge/watchOS-7.0+-1FD67A.svg\" /\u003e\n    \u003cimg src=\"https://img.shields.io/badge/License-MIT-blue.svg\" /\u003e\n    \u003cimg src=\"https://github.com/CypherPoet/UnitIntervalPropertyWrapper/workflows/Build%20\u0026%20Test/badge.svg\" /\u003e\n    \u003ca href=\"https://github.com/apple/swift-package-manager\"\u003e\n      \u003cimg src=\"https://img.shields.io/badge/spm-compatible-brightgreen.svg?style=flat\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://twitter.com/cypher_poet\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/Contact-@cypher_poet-lightgrey.svg?style=flat\" alt=\"Twitter: @cypher_poet\" /\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n\n\u003cp align=\"center\"\u003e\n\n_A Swift Property Wrapper for automatically clamping floating-point values within a closed range of [0,1]._\n\n\u003cp /\u003e\n\n## Installation\n\n### Xcode Projects\n\nSelect `File` -\u003e `Swift Packages` -\u003e `Add Package Dependency` and enter `https://github.com/CypherPoet/UnitIntervalPropertyWrapper`.\n\n\n### Swift Package Manager Projects\n\nYou can add `UnitIntervalPropertyWrapper` as a package dependency in your `Package.swift` file:\n\n```swift\nlet package = Package(\n    //...\n    dependencies: [\n        .package(\n            url: \"https://github.com/CypherPoet/UnitIntervalPropertyWrapper\",\n            .upToNextMinor(from: \"0.1.0\")\n        ),\n    ],\n    //...\n)\n```\n\nFrom there, refer to `UnitIntervalPropertyWrapper` as a \"target dependency\" in any of _your_ package's targets that need it.\n\n```swift\ntargets: [\n    .target(\n        name: \"YourLibrary\",\n        dependencies: [\n          \"UnitIntervalPropertyWrapper\",\n        ],\n        ...\n    ),\n    ...\n]\n```\n\nThen simply `import UnitIntervalPropertyWrapper` wherever you’d like to use it.\n\n\n## Usage\n\n**Basic Usage Example**:\n\n```swift\nimport UnitIntervalPropertyWrapper\n\nstruct AwesomePhoto {\n    @UnitInterval\n    public var opacity: Double\n\n    @UnitInterval\n    public var animationProgress: Double = 0.0\n}\n\nvar photo = AwesomePhoto(opacity: 100)\n\nphoto.opacity             // 1.0\nphoto.animationProgress   // 0.0\n\nphoto.animationProgress = -2.2\n\nphoto.animationProgress  // 0.0\n```\n\nAlso, feel free to use [this project's Xcode Playground](./Examples/Playgrounds/) to explore things further.\n\n\n## Contributing\n\nContributions to `UnitIntervalPropertyWrapper` are most welcome. Check out some of the [issue templates](./.github/ISSUE_TEMPLATE/) for more info.\n\n\n\n## 💻 Developing\n\n### Requirements\n\n- Xcode 12.5+ (Recommended)\n\n\n### 📜 Generating Documentation\n\nDocumentation is generated by [Jazzy](https://github.com/realm/jazzy). Installation instructions can be found [here](https://github.com/realm/jazzy#installation), and as soon as you have it set up, docs can be generated simply by running `jazzy` from the command line.\n\n📝 Note that this will only generate the `docs` folder for you to view locally. This folder is being ignored by `git`, as an [action](./.github/workflows/PublishDocumentation.yml) exists to automatically generate docs at the root level and serve them on the project's `gh-pages` branch.\n\n\n## 🏷 License\n\n`UnitIntervalPropertyWrapper` is available under the MIT license. See the [LICENSE file](./LICENSE) for more info.\n","funding_links":["https://tippin.me/@cypher_poet"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcypherpoet%2Funitintervalpropertywrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcypherpoet%2Funitintervalpropertywrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcypherpoet%2Funitintervalpropertywrapper/lists"}