Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

it-batch

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

it-batch - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

4

index.js
'use strict'
async function * batch (source, size) {
if (isNaN(size)) {
size = 1
}
let things = []

@@ -5,0 +9,0 @@

2

package.json
{
"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]])
})
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc