Comparing version 1.0.0 to 1.0.1
'use strict' | ||
async function * batch (source, size) { | ||
if (isNaN(size)) { | ||
size = 1 | ||
} | ||
let things = [] | ||
@@ -5,0 +9,0 @@ |
{ | ||
"name": "it-batch", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Takes an async iterator that emits things and emits them as fixed size batches", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -12,1 +12,8 @@ import batch from './' | ||
}) | ||
test('Should batch up entries without batch size', async (t) => { | ||
const values = [0, 1, 2, 3, 4] | ||
const res = await all(batch(values)) | ||
t.deepEqual(res, [[0], [1], [2], [3], [4]]) | ||
}) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2622
33