Coercion

1.1.2

Swift type coercion support.
elegantchaos/Coercion

What's New

1.1.2

2021-04-14T10:29:14Z

Added asBool to the Converter protocol.

Test results Latest release swift 5.2 shield swift 5.3 shield swift dev shield Platforms: macOS, iOS, tvOS, watchOS, 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

Description

  • Swift Tools 5.2.0
View More Packages from this Author

Dependencies

  • None
Last updated: Mon Nov 07 2022 21:15:53 GMT-0500 (GMT-05:00)