Collection of useful property wrappers
Clamps value to a range
@Constrained(0...14) var pH: Int
Clamps value to a range from 0 to 1
@UnitInterval var volume: Double
Formats a value with closure
@Formatted({ $0 + 1 }) var increment: Int
Trims whitespace and new lines from string
@Trimmed var string: String
Forcing uppercased string
@Uppercased var name: String
Forcing lowercased string
@Lowercased var name: String
Formats a string to be capitalized
@Capitalized var name: String
- Swift 5+
- More string formatters
- Composition
- Codable propertyWrappers
Feel free to contribute via fork/pull request to master branch. If you want to request a feature or report a bug please start a new issue.