amortization-system

1.0.3 • Public • Published

AMORTIZATION SYSTEMS

This module allows you to calculate repayments for loans. It is based on the German, American, Direct and French amortization systems.

Installation

npm install amortization-system

Usage

const AmortizationSystem = require('amortization-system')

const credit = {
    borrowed_capital: 10000,
    how_many_payments: 180,
    interest: 2.25,
    date_start: Date(),
    borrowed_type: 'month',
    borrowed_time: 180
}

console.table(
    AmortizationSystem.Aleman(
        credit.borrowed_capital, credit.how_many_payments,
        credit.interest, credit.date_start,
        credit.borrowed_type, credit.borrowed_time
    )
)

console.table(
    AmortizationSystem.Americano(
        credit.borrowed_capital, credit.how_many_payments,
        credit.interest, credit.date_start,
        credit.borrowed_type, credit.borrowed_time
    )
)

console.table(
    AmortizationSystem.Directo(
        credit.borrowed_capital, credit.how_many_payments,
        credit.interest, credit.date_start,
        credit.borrowed_type, credit.borrowed_time
    )
)

console.table(
    AmortizationSystem.Frances(
        credit.borrowed_capital, credit.how_many_payments,
        credit.interest, credit.date_start,
        credit.borrowed_type, credit.borrowed_time
    )
)

License

MIT

Dependents (0)

Package Sidebar

Install

npm i amortization-system

Weekly Downloads

11

Version

1.0.3

License

MIT

Unpacked Size

18 kB

Total Files

9

Last publish

Collaborators

  • hcdestroyer
  • elcusanero