• Parameters

    • accounts: AccountObject[]

      array of Account objects

    • additionalPayment: number = 0

      additional payment to apply to each account

    • strategy: string = REPAYMENT_STRATEGIES.AVALANCHE

    Returns Results

    Example

    import snowball from 'node-debt-snowball';

    const accounts = [
    {
    name: 'Credit Card',
    interest: 14.99,
    balance: 1000,
    minPayment: 75,
    },
    {
    name: 'Student Loan',
    interest: 4.75,
    balance: 7500,
    minPayment: 150,
    },
    ];
    const additionalPayment = 100;
    const strategy = 'avalanche';

    const repaymentPlan = snowball(accounts, additionalPayment, strategy);