1.4.0 • Published 11 months ago
payment-plan v1.4.0
Payment plan
Introduction
Use this lib to calculate payment plan, monthly cost and effective interest.
Install
npm install payment-planor
yarn add payment-planFunctions
| Function | Description |
|---|---|
| getEffectiveInterest | Calculate the effective interest rate for a loan |
| getPaymentPlan | Generate a payment plan for a loan |
| getMonthlyCost | Calculate the monthly cost for a specific term of a loan |
Inputs
getEffectiveInterest
| Input | Type | Description | Default Value |
|---|---|---|---|
| loanAmount | number | Loan amount | - |
| terms | number | Total number of terms | - |
| interestRate | number | Annual nominal interest rate (as a decimal) | - |
| startFee | number | One-time start fee | - |
| termFee | number | Fee per term | - |
| type | LoanTypes (optional) | Loan type (ANNUITY or SERIAL) | ANNUITY |
| plan | PaymentPlan (optional) | Existing payment plan to use instead of generating one | - |
getPaymentPlan
| Input | Type | Description | Default Value |
|---|---|---|---|
| loanAmount | number | Loan amount | - |
| interestRate | number | Annual nominal interest rate (as a decimal) | - |
| terms | number | Total number of terms | - |
| gracePeriod | number (optional) | Number of grace period terms | 0 |
| type | LoanTypes (optional) | Loan type (ANNUITY or SERIAL) | ANNUITY |
| startFee | number (optional) | One-time start fee | 0 |
| termFee | number (optional) | Fee per term | 0 |
getMonthlyCost
| Input | Type | Description | Default Value |
|---|---|---|---|
| loanAmount | number | Loan amount | - |
| terms | number | Total number of terms | - |
| interestRate | number | Annual nominal interest rate (as a decimal) | - |
| period | number (optional) | Number of terms per year | 12 |
| index | number (optional) | Term index to calculate the monthly cost for | 0 |
| gracePeriod | number (optional) | Number of grace period terms | 0 |
| termFee | number (optional) | Fee per term | 0 |
| type | LoanTypes (optional) | Loan type (ANNUITY or SERIAL) | ANNUITY |
License
MIT License
1.4.0
11 months ago
1.2.0
2 years ago
1.3.3
2 years ago
1.3.2
2 years ago
1.3.1
2 years ago
1.3.0
2 years ago
1.1.8
2 years ago
1.1.7
2 years ago
1.1.6
2 years ago
1.1.1
2 years ago
1.1.0
2 years ago
1.1.2
2 years ago
1.0.1
3 years ago
1.0.0
3 years ago
0.3.1
4 years ago
0.3.0
4 years ago
0.3.0-beta.0
4 years ago
0.3.0-beta.1
4 years ago
0.2.0
4 years ago
0.1.0
4 years ago
0.0.3
5 years ago
0.0.2
5 years ago