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

it-parallel-batch

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

it-parallel-batch - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

.travis.yml

4

index.js

@@ -6,2 +6,6 @@ 'use strict'

async function * parallelBatch (source, size) {
if (isNaN(size)) {
size = 1
}
for await (const things of batch(source, size)) {

@@ -8,0 +12,0 @@ const results = []

2

package.json
{
"name": "it-parallel-batch",
"version": "1.0.0",
"version": "1.0.1",
"description": "Takes an async iterator that emits promise-returning functions, invokes them in parallel and emits the results in the same order as the input",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -116,1 +116,20 @@ 'use strict'

})
test('Should work without size parameter', async (t) => {
const input = [
async () => {
await delay(200)
return 1
},
async () => {
await delay(100)
return 2
}
]
const res = await all(parallelBatch(input))
t.deepEqual(res, [1, 2])
})
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