1.0.0 • Published 3 years ago

@cdmnky/mortgage v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

mortgage

Build Status

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