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.5.1 to 1.5.2

2

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

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

@@ -52,2 +52,6 @@ var xtend = require('xtend')

}
if (holder._count === 0) {
holder.release()
}
}

@@ -73,3 +77,3 @@ }

if (that._count === 0) {
if (that._count <= 0) { // handles an empty list
that._callback.call(that._callThat)

@@ -96,3 +100,3 @@ that._callback = nop

that._results[i] = result
if (++i === that._count) {
if (++i >= that._count) { // handles an empty list
that._callback.call(that._callThat, that._err, that._results)

@@ -99,0 +103,0 @@ that._callback = nop

@@ -213,1 +213,31 @@ var test = require('tape')

})
test('call the result callback when the each array is empty', function (t) {
t.plan(1)
var instance = parallel()
var obj = {}
instance(obj, something, [], function done () {
t.pass('the result function has been called')
})
function something (arg, cb) {
t.error('this should never be called')
}
})
test('call the result callback when the each array is empty with no results', function (t) {
t.plan(1)
var instance = parallel({ results: false })
var obj = {}
instance(obj, something, [], function done () {
t.pass('the result function has been called')
})
function something (arg, cb) {
t.error('this should never be called')
}
})
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