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

mqemitter-redis

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mqemitter-redis - npm Package Compare versions

Comparing version 4.1.0 to 4.2.0

.github/dependabot.yml

28

mqemitter-redis.js

@@ -199,1 +199,29 @@ 'use strict'

module.exports = MQEmitterRedis
function MQEmitterRedisPrefix (pubSubPrefix, options) {
MQEmitterRedis.call(this, options)
this._pubSubPrefix = pubSubPrefix
this._sym_proxiedCallback = Symbol('proxiedCallback')
}
inherits(MQEmitterRedisPrefix, MQEmitterRedis)
MQEmitterRedisPrefix.prototype.on = function (topic, cb, done) {
const t = this._pubSubPrefix + topic
cb[this._sym_proxiedCallback] = function (packet, cbcb) {
const t = packet.topic.slice(this._pubSubPrefix.length)
const p = { ...packet, topic: t }
return cb.call(this, p, cbcb)
}.bind(this)
return MQEmitterRedis.prototype.on.call(this, t, cb[this._sym_proxiedCallback], done)
}
MQEmitterRedisPrefix.prototype.removeListener = function (topic, func, done) {
const t = this._pubSubPrefix + topic
const f = func[this._sym_proxiedCallback]
return MQEmitterRedis.prototype.removeListener.call(this, t, f, done)
}
MQEmitterRedisPrefix.prototype.emit = function (packet, done) {
const t = this._pubSubPrefix + packet.topic
const p = { ...packet, topic: t }
return MQEmitterRedis.prototype.emit.call(this, p, done)
}
module.exports.MQEmitterRedisPrefix = MQEmitterRedisPrefix

2

package.json
{
"name": "mqemitter-redis",
"version": "4.1.0",
"version": "4.2.0",
"description": "Redis-based MQEmitter",

@@ -5,0 +5,0 @@ "main": "mqemitter-redis.js",

@@ -1,2 +0,2 @@

mqemitter-redis  [![Build Status](https://travis-ci.org/mcollina/mqemitter-redis.png)](https://travis-ci.org/mcollina/mqemitter-redis)
mqemitter-redis  ![ci](https://github.com/mcollina/mqemitter/workflows/ci/badge.svg)
===============

@@ -3,0 +3,0 @@

@@ -12,2 +12,7 @@ 'use strict'

abstractTests({
builder: function (opts) { return new redis.MQEmitterRedisPrefix('some_prefix/', opts) },
test: test
})
function noop () {}

@@ -14,0 +19,0 @@

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