Hacker News new | past | comments | ask | show | jobs | submit login

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])



Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: