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

async-stream-emitter

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

async-stream-emitter - npm Package Compare versions

Comparing version 1.0.2 to 1.1.0

8

index.js

@@ -7,2 +7,6 @@ const StreamDemux = require('stream-demux');

AsyncStreamEmitter.prototype.emit = function (eventName, data) {
this._listenerDemux.write(eventName, data);
};
AsyncStreamEmitter.prototype.listener = function (eventName) {

@@ -16,6 +20,6 @@ return this._listenerDemux.stream(eventName);

AsyncStreamEmitter.prototype.emit = function (eventName, data) {
this._listenerDemux.write(eventName, data);
AsyncStreamEmitter.prototype.closeAllListeners = function () {
this._listenerDemux.closeAll();
};
module.exports = AsyncStreamEmitter;
{
"name": "async-stream-emitter",
"version": "1.0.2",
"version": "1.1.0",
"description": "An alternantive to EventEmitter using async iterable streams.",

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

@@ -33,2 +33,6 @@ const assert = require('assert');

it('should expose an emit method', async () => {
assert.equal(!!streamEmitter.emit, true);
});
it('should expose a listener method', async () => {

@@ -42,5 +46,5 @@ assert.equal(!!streamEmitter.listener, true);

it('should expose an emit method', async () => {
assert.equal(!!streamEmitter.emit, true);
it('should expose a closeAllListeners method', async () => {
assert.equal(!!streamEmitter.closeAllListeners, true);
});
});
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