Can also be used via the corresponding method with same name on BalanceArray
Adds multiple balances to the existing balances. Returns a new BalanceArray.
Can also be used via the corresponding method with same name on BalanceArray
{@inheritDoc applyIncrementsToBalances}
Checks if two balances are equal. Flag to check if the balances with zero amounts should be checked as well.
Can also be used via the corresponding method with same name on BalanceArray
Determines whether all the members of an array satisfy the specified test.
A function that accepts up to three arguments. The every method calls the predicate function for each element in the array until the predicate returns a value which is coercible to the Boolean value false, or until the end of the array.
Optional
thisArg: anyAn object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.
Filters out all balances with amount == 0. Returns a new BalanceArray.
Can also be used via the corresponding method with same name on BalanceArray
Gets all badge IDs from the balances (sorted and merged).
Returns all matching balances for a specific badge ID. Returns a new BalanceArray.
Can also be used via the corresponding method with same name on BalanceArray
Returns all matching balances for a specific time via a new BalanceArray.
Can also be used via the corresponding method with same name on BalanceArray
Sorts balances by their amount property. Returns a new BalanceArray.
Can also be used via the corresponding method with same name on BalanceArray
Checks if the current balances are a subset of the threshold balances (i.e. doesn't exceed the threshold).
Subtracts the balanceToRemove from the existing balances. Returns a new BalanceArray.
Throws an error if the balances underflow.
Can also be used via the corresponding method with same name on BalanceArray
Subtracts multiple balances from the existing balances. Returns a new BalanceArray.
Throws an error if the balances underflow.
Can also be used via the corresponding method with same name on BalanceArray
Updates the balance for what it currently is to newAmount.
Returns a new BalanceArray. Does not modify the original.
Can also be used via the corresponding method with same name on BalanceArray
Static
From
Adds the balanceToAdd to the existing balances. Returns a new BalanceArray.