const LoanCalculator = require('loan-calculator').LoanCalculator;
var lc = new LoanCalculator();
var amortizationSchedule = lc.amortization.getAmortizationSchedule({
amount: 10000,
down: 1000,
deferred: 3,
term: 60,
rate: 6.5
}, 60, [
{
month: 0,
payment: 0
}
]);
console.log(JSON.stringify(amortizationSchedule, null, 4));
import { LoanCalculator } from "loan-calculator";
import { Loan } from "loan-calculator/app/models/loan.model";
const lc = new LoanCalculator();
const loan = new Loan(10000, 0, 0, 6, 6.5);
const amortization = lc.amortization.getAmortizationSchedule(loan, loan.term, []);
console.log(JSON.stringify(amortization, null, 4));