Swiftpack.co - elegantchaos/Coercion as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by elegantchaos.
elegantchaos/Coercion v1.1.3
Swift type coercion support.
⭐️ 0
🕓 2 years ago
iOS macOS watchOS tvOS
.package(url: "https://github.com/elegantchaos/Coercion.git", from: "v1.1.3")

Test results Latest release swift 5.2 shield swift 5.3 shield swift 5.4 shield swift 5.5 shield swift 5.6 shield Platforms: macOS, iOS, tvOS, Linux

Coercion

Support for coercing basic data types.

Provides:

  • coercion protocols which define asInt, asString and so on
  • implementations of these protocols for foundation data types
  • a Converter protocol which can take an Any object and turn it into a known type using the coercion protocols
  • subscript operators for Dictionary which look up a key by type: asInt:, asString: etc, performing coercion where possible

GitHub

link
Stars: 0
Last commit: 1 year ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

1.1.2
3 years ago

Added asBool to the Converter protocol.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics