New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@webiny/pubsub

Package Overview
Dependencies
Maintainers
1
Versions
400
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@webiny/pubsub - npm Package Compare versions

Comparing version 5.17.0-beta.0 to 5.17.0-beta.1

18

index.js

@@ -10,2 +10,16 @@ "use strict";

const subscribers = [];
const withUnsubscribe = cb => {
const once = async event => {
await cb(event);
const index = subscribers.findIndex(fn => fn === once);
if (index > -1) {
subscribers.splice(index, 1);
}
};
return once;
};
return {

@@ -20,2 +34,6 @@ getTopicName() {

subscribeOnce(cb) {
subscribers.push(withUnsubscribe(cb));
},
getSubscribers() {

@@ -22,0 +40,0 @@ return subscribers;

8

package.json
{
"name": "@webiny/pubsub",
"version": "5.17.0-beta.0",
"version": "5.17.0-beta.1",
"main": "index.js",

@@ -22,4 +22,4 @@ "repository": {

"@babel/runtime": "^7.5.5",
"@webiny/cli": "^5.17.0-beta.0",
"@webiny/project-utils": "^5.17.0-beta.0",
"@webiny/cli": "^5.17.0-beta.1",
"@webiny/project-utils": "^5.17.0-beta.1",
"rimraf": "^3.0.2",

@@ -33,3 +33,3 @@ "ttypescript": "^1.5.12",

},
"gitHead": "4b43404bf5ed84250bc9e3e5a64cc80501ae7e34"
"gitHead": "481d1db1aaff389b86d8a220b99bd3ff4d9cd4a0"
}

@@ -8,4 +8,5 @@ export interface Subscriber<TEvent> {

subscribe(cb: (event: TEvent) => void | Promise<void>): void;
subscribeOnce(cb: (event: TEvent) => void | Promise<void>): void;
getSubscribers(): Subscriber<TEvent>[];
publish(event?: TEvent): Promise<void>;
publish(event?: TEvent): Promise<any>;
}

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