node-debt-snowball
Version:
Node script to calculate debt repayment using the snowball method
13 lines (11 loc) • 453 B
text/typescript
export const ERROR_MESSAGES = {
BALANCE_ERROR: 'Balance must be greater than 0',
INTEREST_RATE_ERROR: 'Interest rate must be greater than 0',
MIN_PAYMENT_ERROR: 'Minimum payment must be greater than 0',
MIN_PAYMENT_NOT_ENOUGH: 'Minimum payment is not enough to cover interest',
PAYMENT_OPTIONS_ERROR: 'Balance, interest, and payment are required',
};
export const REPAYMENT_STRATEGIES = {
AVALANCHE: 'avalanche',
SNOWBALL: 'snowball',
};