4 ms·
I tinkered with an alternative to stream interfaces: https://github.com/ralusek/streamie https://github.com/ralusek/streamie allows you to do things like
by ralusek 7mo ago
I tinkered with an alternative to stream interfaces:
https://github.com/ralusek/streamie https://github.com/ralusek/streamie
allows you to do things like
infiniteRecords
.map(item => doSomeAsyncThing(item), { concurrency: 5 });
And then because I found that I often want to switch between batching items vs dealing with single items:
infiniteRecords
.map(item => doSomeAsyncSingularThing(item), { concurrency: 5 })
.map(groupOf10 => doSomeBatchThing(groupsOf10), { batchSize: 10 })
// Can flatten back to single items
.map(item => backToSingleItem(item), { flatten: true });