https://github.com/apollozhu/boolbuilder
A Swift resultBuilder for building a Bool.
https://github.com/apollozhu/boolbuilder
Last synced: about 1 year ago
JSON representation
A Swift resultBuilder for building a Bool.
- Host: GitHub
- URL: https://github.com/apollozhu/boolbuilder
- Owner: ApolloZhu
- License: mit
- Created: 2022-09-24T00:18:37.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-09-28T04:45:53.000Z (over 3 years ago)
- Last Synced: 2025-04-02T00:37:11.523Z (about 1 year ago)
- Language: Swift
- Size: 4.88 KB
- Stars: 11
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# BoolBuilder
`@resultBuilder` for building a `Bool`.
## Example
```swift
import BoolBuilder
let condition: Bool = all {
any {
conditionA
conditionB
.inverted
either {
conditionC
} or: {
conditionD
}
}
conditionE
}
```
## Acknowledgements
Thanks to [@Vince14Genius](https://github.com/vince14genius) for the idea and API feedback.