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

asyncemit

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

asyncemit - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

6

index.js

@@ -28,4 +28,4 @@ 'use strict';

*
* @param {Array} stack The various of event listeners are async emitted.
* @api public
* @param {Array} stack The listeners for the specified event.
* @api private
*/

@@ -57,5 +57,5 @@ (function each(stack) {

);
})(listeners);
})(listeners.slice());
return this;
};
{
"name": "asyncemit",
"version": "1.0.1",
"version": "1.0.2",
"description": "Asynchronously emit event an event based on the arguments length.",

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

@@ -27,3 +27,3 @@ # asyncemit

```
```js
var asyncemit = require('asyncemit')

@@ -30,0 +30,0 @@ , EventEmitter = require('eventemitter3');

@@ -10,3 +10,3 @@ describe('asyncemit', function () {

beforeEach(function () {
ee = new EventEmitter;
ee = new EventEmitter();
ee.asyncemit = asyncemit;

@@ -23,3 +23,3 @@ });

it('returns it self instead of a boolean', function () {
it('returns itself instead of a boolean', function () {
assume(ee.asyncemit('foo', function () {})).equals(ee);

@@ -129,2 +129,16 @@ });

});
it('doesn\'t change the original array of listeners', function (next) {
ee.on('foo', function () {});
ee.on('foo', function () {});
ee.on('foo', function () {});
assume(ee.listeners('foo')).has.length(3);
ee.asyncemit('foo', 'bar', function (err) {
assume(err).is.undefined();
assume(ee.listeners('foo')).has.length(3);
next();
});
});
});
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