New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

fastparallel

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fastparallel - npm Package Compare versions

Comparing version 1.6.0 to 1.6.1

2

package.json
{
"name": "fastparallel",
"version": "1.6.0",
"version": "1.6.1",
"description": "Zero-overhead asynchronous parallel/each/map function call",

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

@@ -97,3 +97,3 @@ var xtend = require('xtend')

this.release = function (err, result) {
that._err = err
that._err = that._err || err
that._results[i] = result

@@ -100,0 +100,0 @@ if (++i >= that._count) { // handles an empty list

@@ -70,3 +70,3 @@ var test = require('tape')

instance(obj, [somethingErr, something], 42, function done (err, results) {
t.error(err)
t.ok(err)
t.equal(count, 2, 'all functions must have completed')

@@ -94,2 +94,35 @@ })

test('fowards errs (bis)', function (t) {
t.plan(3)
var instance = parallel({
released: released
})
var count = 0
var obj = {}
instance(obj, [something, somethingErr], 42, function done (err, results) {
t.ok(err)
t.equal(count, 2, 'all functions must have completed')
})
function something (arg, cb) {
setImmediate(function () {
count++
cb(null, count)
})
}
function somethingErr (arg, cb) {
setImmediate(function () {
count++
cb(new Error('this is an err!'))
})
}
function released () {
t.pass()
}
})
test('does not forward errors or result with results:false flag', function (t) {

@@ -96,0 +129,0 @@ t.plan(8)

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