Skip to content

Commit

Permalink
default size to 1
Browse files Browse the repository at this point in the history
  • Loading branch information
achingbrain committed Nov 26, 2019
1 parent d32166f commit daeabf2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
const batch = require('it-batch')

async function * parallelBatch (source, size) {
if (isNaN(size)) {
size = 1
}

for await (const things of batch(source, size)) {
const results = []
let nextResultIndex = 0
Expand Down

0 comments on commit daeabf2

Please sign in to comment.