Socket
Book a DemoInstallSign in
Socket

finanza

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

finanza

Simple library to perform common personal financial operations

0.0.2
latest
Source
npmnpm
Version published
Weekly downloads
3
200%
Maintainers
1
Weekly downloads
Ā 
Created
Source

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

FAQs

Package last updated on 17 Jun 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with āš”ļø by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.