Download Latest Version v1.10.0 source code.tar.gz (24.2 kB)
Email in envelope

Get an email when there's a new version of cast

Home / v1.9.0
Name Modified Size InfoDownloads / Week
Parent folder
README.md 2025-06-01 3.1 kB
v1.9.0 source code.tar.gz 2025-06-01 23.2 kB
v1.9.0 source code.zip 2025-06-01 34.8 kB
Totals: 3 Items   61.1 kB 0

Notable new features 🎉

  • Casting from type aliases is now supported for basic types
  • Added generic functions: To/ToE, Must, ToNumber/ToNumberE
  • Increased test coverage
  • Converting float numbers from string is now supported

[!WARNING] Since cast now supports converting float values from strings, a related edge case behaves differently:

In previous versions, attempting to convert an empty string to a float resulted in an error.

Starting with this version, the same operation no longer raises an error.

To maintain consistency with the rest of the library, an empty string now converts to the float value 0.0.

What's Changed

New Contributors

Full Changelog: https://github.com/spf13/cast/compare/v1.8.0...v1.9.0

Source: README.md, updated 2025-06-01