Configuration options for asynchronous chunky processing. Supports infinite iterables - each chunk is awaited before consuming the next item.
The type of items in the input iterable
Asynchronous function called to process each chunk. Each commit is awaited before the next item is consumed from the input.
The chunk to commit
Promise that resolves when the chunk is processed
commit: async (chunk) => { await saveToDatabase(chunk) } Copy
commit: async (chunk) => { await saveToDatabase(chunk) }
Configuration options for asynchronous chunky processing. Supports infinite iterables - each chunk is awaited before consuming the next item.