Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
export const saveBooks = async (books) => {
const chunks = chunk(books, 100)
const { results } = await PromisePool
.withConcurrency(10)
.for(chunks)
.process(saveBooksChunk)
return results
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment