0.0.2 ā¢ Published 6 years ago
finanza v0.0.2
Finanza š°
Simple library to perform common personal financial operations
Install
$ npm install finanza
Usage
calculateMonthlyPayment
const monthlyPayment = calculateMonthlyPayment({
principal: 15812.0,
monthlyInterestInPercentage: 1.17,
noOfMonths: 9
});
console.log(monthlyPayment); // 1861.2606240059595
calculateAmortization
const AM = calculateAmortization({
principal: 15812.0,
monthlyPayment: 1860.96,
monthlyInterestInPercentage: 1.17,
firstPaymentDate: "2018-06-15",
noOfMonths: 9
});
/* console.log(AM) š
[ { currentInterest: 185.00039999999998,āāāāā
āāāāā currentPrinciple: 1675.9596000000001,āāāāā
āāāāā endingBalance: 14136.0404,āāāāā
āāāāā currentPaymentDate: Fri Jun 15 2018 00:00:00 GMT+0530 (IST),āāāāā
āāāāā pastDate: true },āāāāā
...
āāāāā { currentInterest: 21.554225914525635,āāāāā
āāāāā currentPrinciple: 1839.4057740854744,āāāāā
āāāāā endingBalance: 2.835757070562977,āāāāā
āāāāā currentPaymentDate: Fri Feb 15 2019 00:00:00 GMT+0530 (IST),āāāāā
āāāāā pastDate: false } ]āāāāā
*/
Note Month starts with 0-index in js. Make sure you pass proper month.
daysUntilDebtFree
daysUntilDebtFree({ amortizationList: AM }); // 242
License
MIT Ā© Ashik Nesin