Methods
count
- count(): number
-
Returns number
filter
- filter(fn: ((v: T, i: number) => boolean)): Model<T>
-
Parameters
-
fn: ((v: T, i: number) => boolean)
-
- (v: T, i: number): boolean
-
Returns boolean
Returns Model<T>
forEach
- forEach(fn: ((v: T, i: number) => void)): void
-
Parameters
-
fn: ((v: T, i: number) => void)
-
- (v: T, i: number): void
-
Returns void
Returns void
map
- map<U>(fn: ((v: T, i: number) => U)): U[]
-
Parameters
-
fn: ((v: T, i: number) => U)
-
- (v: T, i: number): U
-
Returns U
Returns U[]
reduce
- reduce(callbackfn: ((previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T)): T
-
Parameters
-
callbackfn: ((previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T)
-
- (previousValue: T, currentValue: T, currentIndex: number, array: T[]): T
-
Parameters
-
previousValue: T
-
currentValue: T
-
currentIndex: number
-
array: T[]
Returns T
Returns T
- reduce(callbackfn: ((previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T), initialValue: T): T
-
Parameters
-
callbackfn: ((previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T)
-
- (previousValue: T, currentValue: T, currentIndex: number, array: T[]): T
-
Parameters
-
previousValue: T
-
currentValue: T
-
currentIndex: number
-
array: T[]
Returns T
-
initialValue: T
Returns T
- reduce<U>(callbackfn: ((previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U), initialValue: U): U
-
Parameters
-
callbackfn: ((previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U)
-
- (previousValue: U, currentValue: T, currentIndex: number, array: T[]): U
-
Parameters
-
previousValue: U
-
currentValue: T
-
currentIndex: number
-
array: T[]
Returns U
-
initialValue: U
Returns U
sort
- sort(by: string): Model<T>
-
Returns Model<T>
toArray
- toArray(): T[]
-
Returns T[]
Warehouse method