calculate installments, installments decreasing, the sum of interest js
/**
Install guide: Using with TypeScript
https://www.npmjs.com/package/interest-bankjs
npm i interest-bankjs
Using with Javascript:
https://github.com/kfiku/LoanJS
npm install loanjs
**/
import { Loan } from 'interest-bankjs';
var loan = Loan(
1000, // amount
12, // installments number
5, // interest rate
true // diminishing
);
// With JavaScript
var LoanJS = require('loanjs');
var loan = new LoanJS.Loan(
1000, // amount
12, // installments number
5, // interest rate
true // diminishing
);