https://github.com/serv/amortizationjs
https://github.com/serv/amortizationjs
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/serv/amortizationjs
- Owner: serv
- Created: 2021-04-13T06:45:23.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-04-30T05:29:59.000Z (about 5 years ago)
- Last Synced: 2025-10-19T04:32:21.374Z (9 months ago)
- Language: TypeScript
- Size: 141 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# amortization.js
amortization.js is a javascript package that calculates payment information for a loan or a mortgage.
## Installation
```bash
npm i amortizationjs
```
## Usage
```javascript
import amortize from 'amortizationjs';
const totalAmount = 200_000;
const downPayment = 50_000;
const interestRate = 5;
const years = 30;
const paymentsPerYear = 12;
const loan = new Loan(
totalAmount,
downPayment,
interestRate,
years,
paymentsPerYear
);
console.log(loan.total);
console.log(loan.payments);
```
## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
## License
[MIT](https://choosealicense.com/licenses/mit/)