Swiftpack.co -  Package - elegantchaos/Coercion
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
Swift type coercion support.
.package(url: "https://github.com/elegantchaos/Coercion.git", from: "v1.1.1")

Test results Latest release swift 5.2 shield swift 5.3 shield swift dev shield Platforms: macOS, iOS, tvOS, watchOS, Linux


Support for coercing basic data types.


  • 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


Stars: 0
Last commit: 3 weeks ago

Release Notes

3 weeks ago

Fixed Linux tests.

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