A library to safely manipulate monetary values
npm install ezmoney
A library to safely manipulate monetary values.
Ezmoney (/ˈizi'mʌni\/) helps you operate on monetary values, compare them, format them, and more. It features:
- Pure functions: Ezmoney only exports side-effect free functions. This makes the API simple and enables dead code elimination (i.e. tree-shaking).
- Safety first: Thanks to TypeScript, Ezmoney is fully type-safe. Additionally, all the standard functions validate their arguments for the properties that TypeScript cannot verify.
- Opt-in performance boost: All functions have an _unsafe_ variant that forgoes the validation of the arguments. Use it when you are confident in the correctness of your code and need that extra bit of oomph.
To add Ezmoney to your page, include the following tag to your HTML.
``html