Function slidingWindowFilter
- slidingWindowFilter<T>(items, fn, options?): T[][]
Parameters
items: T[]
fn: ((items, start, collection) => boolean)
- (items, start, collection): boolean
Parameters
items: T[]
start: number
collection: T[]
Returns boolean
Optional
options: {
increments: undefined | number;
start: undefined | number;
windowSize: undefined | number;
} = {}
increments: undefined | number
start: undefined | number
windowSize: undefined | number
Returns T[][]
- An array of sliding windows that pass the test implemented by the provided function.
Filters sliding windows of elements in the array based on a predicate function.