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

emitter-pubsub-broker

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

emitter-pubsub-broker - npm Package Compare versions

Comparing version 0.5.0 to 0.6.0

3

lib/EmitterPubsubBroker.js

@@ -392,3 +392,2 @@ 'use strict';

}
}

@@ -400,2 +399,2 @@

module.exports = EmitterPubsubBroker;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9FbWl0dGVyUHVic3ViQnJva2VyLmpzIl0sIm5hbWVzIjpbIlByb21pc2UiLCJyZXF1aXJlIiwiUmVkaXMiLCJtc2dwYWNrIiwiRXZlbnRFbWl0dGVyIiwiUmVkaXNDb25uZWN0b3IiLCJjb25zdHJ1Y3RvciIsIm9wdGlvbnMiLCJwdWIiLCJzdWIiLCJzdWJzY3JpYmUiLCJjYXRjaFJldHVybiIsIm9uIiwiX29uTWVzc2FnZSIsImJpbmQiLCJlbWl0IiwiYnVmIiwiZGF0YSIsImNoIiwidG9TdHJpbmciLCJwdWJsaXNoIiwidW5zdWJzY3JpYmUiLCJjbG9zZSIsImFsbCIsInF1aXQiLCJNZW1vcnlDb25uZWN0b3IiLCJyZXNvbHZlIiwidGhlbiIsIkVtaXR0ZXJQdWJzdWJCcm9rZXIiLCJjb25uZWN0IiwicHJlZml4IiwibWV0aG9kIiwic2VyaWFsaXplIiwiZW5jb2RlIiwiZGVzZXJpYWxpemUiLCJkZWNvZGUiLCJlbmNvZGVyIiwiaW5jbHVkZUNoYW5uZWwiLCJjbGllbnRDaGFubmVscyIsIk1hcCIsImNoYW5uZWxDbGllbnRzIiwiY29ubmVjdG9yIiwidXNlU2VyaWFsaXphdGlvbiIsIl9kaXNwYXRjaCIsIl9jaGFubmVsQWRkQ2xpZW50IiwiY2xpZW50IiwiY2hhbm5lbC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lbmRlciB8fCBjbGllbnQuaWQgIT09IHNlbmRlcikge1xuICAgICAgICAgICAgICBQcm9taXNlXG4gICAgICAgICAgICAgICAgLnRyeSgoKSA9PiBlbmNvZGVyID8gY2xpZW50W21ldGhvZF0oZGF0YSkgOiBjbGllbnRbbWV0aG9kXSguLi5kYXRhKSlcbiAgICAgICAgICAgICAgICAuY2F0Y2hSZXR1cm4oKVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH0pXG4gICAgICAgIH0pXG4gICAgICB9XG4gICAgfSlcbiAgfVxuXG59XG5cbi8vIGNvbXBhdGliaWxpdHlcbkVtaXR0ZXJQdWJzdWJCcm9rZXIucHJvdG90eXBlLnVuc3Vic2NyaWJlYWxsID0gRW1pdHRlclB1YnN1YkJyb2tlci5wcm90b3R5cGUudW5zdWJzY3JpYmVBbGxcblxubW9kdWxlLmV4cG9ydHMgPSBFbWl0dGVyUHVic3ViQnJva2VyXG4iXX0=
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9FbWl0dGVyUHVic3ViQnJva2VyLmpzIl0sIm5hbWVzIjpbIlByb21pc2UiLCJyZXF1aXJlIiwiUmVkaXMiLCJtc2dwYWNrIiwiRXZlbnRFbWl0dGVyIiwiUmVkaXNDb25uZWN0b3IiLCJjb25zdHJ1Y3RvciIsIm9wdGlvbnMiLCJwdWIiLCJzdWIiLCJzdWJzY3JpYmUiLCJjYXRjaFJldHVybiIsIm9uIiwiX29uTWVzc2FnZSIsImJpbmQiLCJlbWl0IiwiYnVmIiwiZGF0YSIsImNoIiwidG9TdHJpbmciLCJwdWJsaXNoIiwidW5zdWJzY3JpYmUiLCJjbG9zZSIsImFsbCIsInF1aXQiLCJNZW1vcnlDb25uZWN0b3IiLCJyZXNvbHZlIiwidGhlbiIsIkVtaXR0ZXJQdWJzdWJCcm9rZXIiLCJjb25uZWN0IiwicHJlZml4IiwibWV0aG9kIiwic2VyaWFsaXpl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oaXMuZW5jb2RlciA/IHRoaXMuZW5jb2RlcihhcmdzKSA6IGFyZ3MpLnRoZW4oZGF0YSA9PiB7XG4gICAgICAgICAgY29uc3QgbWV0aG9kID0gdGhpcy5tZXRob2RcbiAgICAgICAgICBjb25zdCBlbmNvZGVyID0gdGhpcy5lbmNvZGVyXG4gICAgICAgICAgY29uc3Qgc2VuZGVyID0gbWVzc2FnZS5zZW5kZXJcbiAgICAgICAgICBjbGllbnRzLmZvckVhY2goY2xpZW50ID0+IHtcbiAgICAgICAgICAgIGlmICghc2VuZGVyIHx8IGNsaWVudC5pZCAhPT0gc2VuZGVyKSB7XG4gICAgICAgICAgICAgIFByb21pc2VcbiAgICAgICAgICAgICAgICAudHJ5KCgpID0+IGVuY29kZXIgPyBjbGllbnRbbWV0aG9kXShkYXRhKSA6IGNsaWVudFttZXRob2RdKC4uLmRhdGEpKVxuICAgICAgICAgICAgICAgIC5jYXRjaFJldHVybigpXG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSlcbiAgICAgICAgfSlcbiAgICAgIH1cbiAgICB9KVxuICB9XG59XG5cbi8vIGNvbXBhdGliaWxpdHlcbkVtaXR0ZXJQdWJzdWJCcm9rZXIucHJvdG90eXBlLnVuc3Vic2NyaWJlYWxsID0gRW1pdHRlclB1YnN1YkJyb2tlci5wcm90b3R5cGUudW5zdWJzY3JpYmVBbGxcblxubW9kdWxlLmV4cG9ydHMgPSBFbWl0dGVyUHVic3ViQnJva2VyXG4iXX0=
{
"name": "emitter-pubsub-broker",
"version": "0.5.0",
"version": "0.6.0",
"private": false,

@@ -11,3 +11,3 @@ "description": "An utility for connecting EventEmitters via a pubsub.",

"generate-docs": "jsdoc --configure .jsdoc.json --verbose",
"prepublish": "npm run compile",
"prepare": "npm run compile",
"pretest": "npm run compile",

@@ -37,4 +37,4 @@ "test": "nyc mocha"

"bluebird": "^3.3.5",
"eventemitter3": "^2.0.2",
"ioredis": "^2.4.0",
"eventemitter3": "^3.0.0",
"ioredis": "^3.2.2",
"msgpack-lite": "^0.1.20",

@@ -46,10 +46,10 @@ "semver": "^5.3.0"

"babel-preset-es2015-node4": "^2.1.0",
"chai": "^3.5.0",
"codecov": "^1.0.1",
"chai": "^4.1.2",
"codecov": "^3.0.0",
"docdash": "^0.4.0",
"event-to-promise": "^0.7.0",
"event-to-promise": "^0.8.0",
"jsdoc": "^3.4.0",
"mocha": "^3.0.0",
"nyc": "^10.0.0",
"standard": "^8.0.0"
"mocha": "^4.1.0",
"nyc": "^11.4.1",
"standard": "^10.0.3"
},

@@ -56,0 +56,0 @@ "nyc": {

@@ -387,3 +387,2 @@ 'use strict'

}
}

@@ -390,0 +389,0 @@

'use strict'
/* eslint-env mocha */
/* eslint-disable no-unused-expressions */

@@ -12,3 +13,3 @@ const EmitterPubsubBroker = require('../index.js')

const configs = [ { name: 'memory', connect: '' },
{ name: 'redis', connect: 'redis://localhost:6379' } ]
{ name: 'redis', connect: 'redis://localhost:6379' } ]

@@ -163,3 +164,3 @@ let broker

.then(() => {
expect(broker.getSubscriptions(client1)).empty
expect(broker.getSubscriptions(client1)).undefined
eventToPromise(client1, 'myEvent').then(notReachable)

@@ -166,0 +167,0 @@ broker.send(client1, 'my-channel', 'myEvent', 'arg')

Sorry, the diff of this file is not supported yet

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