Arbitrary-precision number, money and currency formatting for the browser or the server.
accounting-bigis a fork of accounting.js which has been updated to support arbitrary-precision numbers. It can handle any number without risk of rounding or precision errors, which is extremely important when working with money.
yarn add accounting-big
import 'accounting' from 'accounting-big'; accounting.formatMoney('1234567.2'); // => "$1,234,567.20"
The full API can be found on the accounting.js website.