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

listen

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

listen - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

5

lib/listen.js

@@ -24,2 +24,3 @@ /**

var count = 0;
var called = 0;
var errList;

@@ -45,3 +46,3 @@ var handler;

}
if (!--count && handler) {
if (++called === count && handler) {
resolve(handler);

@@ -72,3 +73,3 @@ }

handler = fn;
if (!count) {
if (called === count) {
resolve(fn);

@@ -75,0 +76,0 @@ }

2

package.json
{
"name" : "listen",
"version" : "0.1.0",
"version" : "0.1.1",
"description" : "Wait for the results of multiple callbacks",

@@ -5,0 +5,0 @@ "author" : "Maximilian Antoni (http://maxantoni.de)",

@@ -29,2 +29,3 @@ /**

});

@@ -161,2 +161,15 @@ /**

'should not confuse argument order': function () {
var spy = sinon.spy();
var callbackA = this.listener();
callbackA(null, false);
var callbackB = this.listener();
callbackB(null, true);
this.then(spy);
sinon.assert.calledWith(spy, null, [false, true]);
},
'should pass error to given function': function () {

@@ -163,0 +176,0 @@ var spy = sinon.spy();

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