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

pubst

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

pubst - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

8

package.json
{
"name": "pubst",
"version": "0.0.6",
"version": "0.0.7",
"description": "Basic JavaScript Pub/Sub Event Emitter",
"main": "lib/pubst.js",
"scripts": {
"build": "babel src -d lib",
"lint": "eslint ./src",
"prepublish": "babel src -d lib",
"test": "mocha ./src/*.test.js"

@@ -37,7 +37,7 @@ },

"clear-require": "2.0.0",
"eslint": "4.14.0",
"eslint": "4.15.0",
"mocha": "4.1.0",
"sinon": "4.1.3",
"sinon": "4.1.6",
"sinon-chai": "2.14.0"
}
}

@@ -9,17 +9,5 @@ # Pubst

+ Warnings when publishing to a topic that has no subscribers.
+ Allow for a subscription to all topics. (Not implemented here either)
## TODO (In no particular order)
+ Use this in a few things to feel out the API.
+ If I'm going to continue to use this implementation, I should probably write actual documentation.
+ Warnings when publishing to a topic that has no subscribers.
+ Allow for a subscription to all topics.
+ Heirarchical topic names and pubish events.
+ An initialization of the event emitter that allows for explicit naming of known topics.
+ Once implemented, can warn when a topic is subscribed to that has not been declared.
+ Warnings when a large number of subscribers exist for a given topic. (Maybe max is configurable?) Should help in the detection of subscriber leaks.
+ Support debounce settings for spurriously noisy topics.
+ Support throttle settings for consistently noisy topics.
+ Support topic queing with a max history size to maintain.
+ Support various persistent storage strategies.
+ ???
+ Profit

@@ -126,3 +126,3 @@ const clearRequire = require('clear-require');

expect(handler).to.have.been.calledWith(testPayload, TEST_TOPIC_1);
handler.reset();
handler.resetHistory();

@@ -159,6 +159,6 @@ pubst.publish(TEST_TOPIC_1, null);

topic1Handler1.reset();
topic1Handler2.reset();
topic2Handler1.reset();
topic2Handler2.reset();
topic1Handler1.resetHistory();
topic1Handler2.resetHistory();
topic2Handler1.resetHistory();
topic2Handler2.resetHistory();

@@ -194,4 +194,4 @@ pubst.publish(TEST_TOPIC_2, testPayload);

handler1.reset();
handler2.reset();
handler1.resetHistory();
handler2.resetHistory();

@@ -207,4 +207,4 @@ unsub1();

handler1.reset();
handler2.reset();
handler1.resetHistory();
handler2.resetHistory();

@@ -234,3 +234,3 @@ unsub2();

expect(handler).to.have.been.calledWith(originalPayload, TEST_TOPIC_1);
handler.reset();
handler.resetHistory();

@@ -237,0 +237,0 @@ pubst.publish(TEST_TOPIC_1, null);

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