cfpb / amortize

A node module to calculate the interest paid, principal paid, remaining balance, and monthly payment of a loan.
Creative Commons Zero v1.0 Universal
58 stars 19 forks source link

Initial amortize module code #1

Closed ascott1 closed 10 years ago

ascott1 commented 10 years ago

This is the initial code for the amortize node module.

contolini commented 10 years ago

Should we throw an error if an argument is less than zero? Or is that hand-holding?

ascott1 commented 10 years ago

We probably should. Now that you mention it, I think that's what we do in loan-calc

ascott1 commented 10 years ago

@contolini I added some error checks and wrote a couple of tests for them. Let me know what you think.

contolini commented 10 years ago

:+1: