@cdmnky/mortgage
v1.0.0
Published
Library for node.js that calculates mortgages
Downloads
2
Readme
mortgage
Library for node.js that calculates mortgages.
Usage
const Mortgage = require('@cdmnky/mortgage');
// $100,000 mortgage at 3% interest for 30 years
let m = new Mortgage(100000, 0.03, 30);
// get monthly payment
let monthlyPayment = m.payment();
// get interest portion of monthly payment
let interest = m.paymentInterest();
// get monthly pricipal
let principal = m.paymentPrincipal();
// get amortization schedule
let schedule = m.amortizationSchedule();
Testing
npm test