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: Tue Mar 12 2024 09:53:12 GMT-0900 (Hawaii-Aleutian Daylight Time)