.reset()

Resets the keys with default values from the entries that match the provided filter to their default values. Resets the keys with default values from all the entries if no filter is provided.

reset(filter)

// Note: BankAccounts is a collection created with
// a default value of 0 for a key named "balance"

BankAccounts.getAll();  // [{ id: 1, balance: 0 }, { id: 2, balance: 850 }] 

BankAccounts.reset(acc => acc.id === 2); // [{ id: 2, balance: 0 }] 

BankAccounts.getAll();  // [{ id: 1, balance: 0 }, { id: 2, balance: 0 }] 

Last updated