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 2.2.0 to 2.3.0

4

mqemitter-redis.js

@@ -66,2 +66,4 @@ 'use strict'

MQEmitter.call(this, opts)
this._opts.regexWildcardOne = new RegExp(this._opts.wildcardOne.replace(/([/,!\\^${}[\]().*+?|<>\-&])/g, '\\$&'), 'g')
}

@@ -95,3 +97,3 @@

MQEmitterRedis.prototype._subTopic = function (topic) {
return topic.replace(this._opts.wildcardOne, '*')
return topic.replace(this._opts.regexWildcardOne, '*')
.replace(this._opts.wildcardSome, '*')

@@ -98,0 +100,0 @@ }

{
"name": "mqemitter-redis",
"version": "2.2.0",
"version": "2.3.0",
"description": "Redis-based MQEmitter",

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

"inherits": "^2.0.1",
"ioredis": "^3.0.0",
"ioredis": "^3.2.2",
"lru-cache": "^4.1.1",
"mqemitter": "^2.0.0",
"mqemitter": "^2.2.0",
"msgpack-lite": "^0.1.14",

@@ -18,4 +18,5 @@ "shortid": "^2.2.2"

"pre-commit": "^1.0.7",
"standard": "^10.0.2",
"tape": "^4.0.0"
"safe-buffer": "^5.1.1",
"standard": "^10.0.3",
"tape": "^4.8.0"
},

@@ -22,0 +23,0 @@ "scripts": {

@@ -67,1 +67,18 @@ 'use strict'

})
test('topic pattern adapter', function (t) {
var e = redis()
var mqttTopic = 'rooms/+/devices/+/status'
var expectedRedisPattern = 'rooms/*/devices/*/status'
var subTopic = e._subTopic(mqttTopic)
t.plan(1)
t.deepEqual(subTopic, expectedRedisPattern)
e.close(function () {
t.end()
})
})
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