Properties
frozen
frozen: boolean = false
Methods
add
-
Parameters
-
-
Default value quantity: number = 1
addItem
- addItem(item: number, quantity?: number): this
-
Parameters
-
item: number
-
Default value quantity: number = 1
Returns this
amount
- amount(item: string | number): number
-
Parameters
Returns number
equals
- equals(otherBank: Bank): boolean
-
Parameters
Returns boolean
filter
- filter(fn: (item: Item, quantity: number) => boolean, mutate?: boolean): Bank
-
Parameters
-
fn: (item: Item, quantity: number) => boolean
-
- (item: Item, quantity: number): boolean
-
Parameters
Returns boolean
-
Default value mutate: boolean = false
fits
-
Parameters
Returns number
forEach
- forEach(fn: (item: Item, quantity: number) => unknown): void
-
Parameters
-
fn: (item: Item, quantity: number) => unknown
-
- (item: Item, quantity: number): unknown
-
Parameters
Returns unknown
Returns void
has
- has(items: string | number | (string | number)[] | ItemBank | Bank): boolean
-
Parameters
-
items: string | number | (string | number)[] | ItemBank | Bank
Returns boolean
items
- items(): [Item, number][]
multiply
- multiply(multiplier: number, itemsToNotMultiply?: number[]): this
-
Parameters
-
multiplier: number
-
Optional itemsToNotMultiply: number[]
Returns this
remove
-
Parameters
-
-
Default value quantity: number = 1
removeItem
- removeItem(item: number | string, quantity?: number): this
-
Parameters
-
item: number | string
-
Default value quantity: number = 1
Returns this