accountantjs
v1.1.0
Published
A JavaScript library for calculations related to all things money
Downloads
2
Maintainers
Readme
Accountant.js
A JavaScript library for calculations related to all things money - https://ju66ernaut.github.io/accountant.js/
Installation
npm install accountantjs --save
or
- Download or fork the repository from GitHub.
- Place 'accountant.js' in your project and include it in your application.
Example Usage
var Accountant = require('accountantjs');
var acc = new Accountant();
// Calculate Compound Interest
// Example: account with a $1500 original balance earns 12%/year
// and is compounded monthly (1%/month) for 12 months
acc.CompoundInterest(1500, 1, 12);
// => 190.24
Notes
Accountant.js allows for both decimals and whole number percentages for functions that require 'rate' parameters
acc.CompoundInterest(1500, 1, 12); // => 190.24
acc.CompoundInterest(1500, 0.01, 12); // => 190.24
Accountant.js is inspired by Essam Al Joubori's finance.js - http://financejs.org/