Skip to content

Releases: frappe/pesa

v1.1.0

28 Dec 07:32
Compare
Choose a tag to compare

Changelog since v1.0.0

  1. Added .abs()

    pesa(-1).abs().eq(1) 
    // true

    Note: if you're pulling from npm, due to my incompetence—that shines through only in the simplest of tasks—this function is actually in v1.1.1, also there is no v1.1.0 on npm.

  2. Added .store for precision preserving strings

    pesa(2).store 
    // '2.000000'
  3. Added .options to inspect options

    pesa(3).options
    // { currency: '', precision: 6, display: 3, rates: [] }
  4. Allow passing bigint to directly set internal value

    pesa(4n).internal
    // { bigint: 4n, precision: 6 }
  5. Special display functions call preciseNumber functions

    pesa(5).toString()  // '5'
    pesa(5).toJSON()    // '5'
    pesa(5).valueOf()   // 5000000n
  6. Fixed utils.toDecimalString which fixed toString and toJSON

PRs and Contributors

[show/hide]

PRs

New Contributors

Full Changelog: v1.0.0...v1.1.0

v1.0.0

26 Nov 10:27
Compare
Choose a tag to compare

First release. I think this is ready to use. If any bugs, come find me.