1.0.1 • Published 9 years ago
loan-calculations v1.0.1
loan-calculations
Module for providing loan and interest calculations.
Install
npm i loan-calculations
API
Functions
getSumPaid(term, monthly, date, installmentDay)
Calculates total amount paid
Kind: global function
Param | Type | Description |
---|---|---|
term | number | Number of installments |
monthly | number | Monthly payment |
date | Date | Acceptance date |
installmentDay | number | Day in month of installment payment |
getInstallment(amount, interestRate, term, roundingFn) ⇒ Promise
Single installment value
Kind: global function
Param | Type | Description |
---|---|---|
amount | number | Loan amount |
interestRate | number | Loan interest rate |
term | number | Number on installments (monthly payments) |
roundingFn | function | Rounding function |
getRpsn(amount, term, monthly, date, installmentDay)
Calculates loan yearly percentage rate
Kind: global function
Param | Type | Description |
---|---|---|
amount | number | Loan amount |
term | number | Number of installments |
monthly | number | Monthly payment |
date | Date | Acceptance date |
installmentDay | number | Day in month of installment payment |
Example
getRpsn(120000, 60, 2700, new Date('2016-07-05'), 5)
Author
- Viktor Bezdek (@viktorbezdek)
- Petr Certik (@czert)
License
MIT © SiteOne
1.0.1
9 years ago
1.0.0-alpha
9 years ago