Socket
Socket
Sign inDemoInstall

@effection/channel

Package Overview
Dependencies
Maintainers
1
Versions
130
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@effection/channel - npm Package Compare versions

Comparing version 0.6.1-3cde29a to 0.6.1-b1952e1

1

dist/channel.d.ts

@@ -9,2 +9,3 @@ import { Operation } from 'effection';

subscribe(): Operation<Subscription<T, void>>;
close(): void;
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Channel = void 0;
const effection_1 = require("effection");
const subscription_1 = require("@effection/subscription");

@@ -21,6 +22,15 @@ const events_1 = require("@effection/events");

subscribe() {
return subscription_1.Subscribable.from(events_1.on(this.bus, 'message')).map(([message]) => message)[subscription_1.SymbolSubscribable]();
let { bus } = this;
return subscription_1.createSubscription(function* (publish) {
yield effection_1.spawn(subscription_1.forEach(events_1.on(bus, 'message'), function* ([message]) {
publish(message);
}));
yield events_1.once(bus, 'close');
});
}
close() {
this.bus.emit('close');
}
}
exports.Channel = Channel;
//# sourceMappingURL=channel.js.map

2

package.json
{
"name": "@effection/channel",
"version": "0.6.1-3cde29a",
"version": "0.6.1-b1952e1",
"description": "MPMC Channel implementation for effection",

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

Sorry, the diff of this file is not supported yet

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