@ma.vu/app-money - v0.1.2
    Preparing search index...

    Function fromDecimal

    • Parse a decimal amount. Prefer strings from the wire; a number is accepted but anything that isn't representable exactly (0.1 + 0.2, 1e21) is rejected rather than silently rounded.

      Parameters

      • value: string | number
      • currency: "BAM" | "CHF" | "EUR" | "USD"

      Returns Result<Money, InvalidAmount>