https://github.com/zeta611/extensible
Kotlin standard extension functions for Swift
https://github.com/zeta611/extensible
kotlin kotlin-extension-functions swift syntactic-sugar
Last synced: about 2 months ago
JSON representation
Kotlin standard extension functions for Swift
- Host: GitHub
- URL: https://github.com/zeta611/extensible
- Owner: Zeta611
- Created: 2020-03-10T12:01:18.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-03-10T12:18:15.000Z (about 5 years ago)
- Last Synced: 2025-02-01T21:35:10.854Z (4 months ago)
- Topics: kotlin, kotlin-extension-functions, swift, syntactic-sugar
- Language: Swift
- Size: 3.91 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Extensible
Kotlin standard extension functions for Swift!
This library is inspired by Kotlin standard extension functions and [Then](https://github.com/devxoul/Then).
## Example
```swift
let widthOrNil = CGRect(origin: .zero, size: CGSize(width: 100, height: 100))
.also { print("width: \($0.width)") }
.takeIf { $0.width > 50 }?
.let { $0.width }
print(widthOrNil ?? "nil")
```## License
Extensible is available under the MIT license. See the LICENSE file for more info.