A lightweight JavaScript library for number, money and currency formatting - fully localisable, zero dependencies.
undefinedaccounting.js is a tiny JavaScript library for number, money and currency parsing/formatting. It’s lightweight, fully localisable, has no dependencies, and works great client-side or server-side. Use standalone or as a nodeJS/npm and AMD/requireJS module.
Visit the plugin homepage for demos and documentation: http://openexchangerates.github.io/accounting.js/undefined
Please checkout or download the latest stable tag before using in production. Bug reports and pull requests are welcome.
Maintained by Open Exchange Rates and originally by @josscrowcroft and other contributors.
undefinedv0.4.2 - Added bower.json
undefinedv0.4.1 - Alias accounting.formatNumber() as accounting.format()
undefinedv0.4 - Transferred repository to Open Exchange Rates for ongoing maintenance
undefinedv0.3.2 - Fixed package.json dependencies (should be empty object)
undefinedv0.3.0undefined
npm install accounting and then var accounting = require("accounting"); in your nodeJS scripts.acounting.unformat now also aliased as acounting.parsedefaults methodundefinedv0.2.2 - Fixed same issue as #Num: #24 in formatNumber; switch to Google Closure Compiler for minified version.
undefinedv0.2.1 - Fixed issue #Num: #24 (locally-defined settings object was being modified by formatMoney)
undefinedv0.2undefined
accounting.settings.currency.formatundefinedv0.1.4undefined
undefinedv0.1.3undefined
format parameter to control symbol and value position (default "%s%v", or [symbol][value])undefinedv0.1.2undefined
accounting.formatColumn( [[1,12,123,1234], [1234,123,12,1]] ), returns matching array with inner columns lined up)undefinedv0.1.1undefined
accounting.toFixed(value, precision)), which treats floats more like decimals for more accurate currency roundingNaN errors when no value in unformatundefinedundefinedv0.1 - First version
We use cookies
We use cookies to analyze traffic and improve your experience. You can accept or reject analytics cookies.