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

multicb

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

multicb - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

test/spread.js

14

index.js

@@ -13,4 +13,8 @@ module.exports = function(allopts) {

}
if(n == m)
if(n == m) {
if (o('spread'))
return cb.apply(null, [null].concat(results))
else
return cb(null, results)
}

@@ -33,4 +37,8 @@ _cb = cb

results[i] = Array.prototype.slice.call(arguments)
if (n === m && _cb)
_cb(null, results)
if (n === m && _cb) {
if (o('spread'))
_cb.apply(null, [null].concat(results))
else
_cb(null, results)
}
}

@@ -37,0 +45,0 @@ }

{
"name": "multicb",
"version": "1.1.0",
"version": "1.2.0",
"description": "Simple way to aggregate multiple node-style callbacks",

@@ -5,0 +5,0 @@ "dependencies": {},

@@ -41,2 +41,15 @@ # MultiCB

})
// spread argument
var done = multicb({ pluck: 1, spread: true })
doAsync(done())
doAsync(done())
doAsync(done())
done(function(err, a, b, c) {
console.log(err) // => undefined
console.log(a) // => 'foo'
console.log(b) // => 'bar'
console.log(c) // => 'baz'
})
```
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