News for hackers. Stuff that matters.
Re:Dinero.js – JavaScript library for working with monetary ... by nodesocket on Monday April 16, 2018 @08:17PM (#16854259)
Like the Stripe model, amounts should be in cents (integers), don't use decimals.

Functions such as allocate() are super useful:

    // returns an array of two Dinero objects
    // the first one with an amount of 502
    // the second one with an amount of 501
    Dinero({ amount: 1003 }).allocate([50, 50])

There are no comments on this comment yet.