Skip to content

Latest commit

 

History

History
13 lines (8 loc) · 728 Bytes

polyethylene.asyncchunkingpredicate.md

File metadata and controls

13 lines (8 loc) · 728 Bytes

Home > polyethylene > AsyncChunkingPredicate

AsyncChunkingPredicate type

A function that receives an element (elem) of the iteration and the first and last element of a chunk, and returns a boolean value or a Promise to a boolean value representing whether elem should be added to the current chunk (if true) or be the start of a new chunk (if false)

Signature:

export declare type AsyncChunkingPredicate<T> = (elem: T, lastElem: T, firstElem: T) => boolean | PromiseLike<boolean>;