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

mqtt-pattern

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mqtt-pattern - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

6

index.js

@@ -21,2 +21,8 @@ "use strict";

if (!patternSegments[0])
patternSegments = patternSegments.slice(1);
if (!topicSegments[0])
topicSegments = topicSegments.slice(1);
var patternLength = patternSegments.length;

@@ -23,0 +29,0 @@ var topicLength = topicSegments.length;

2

package.json
{
"name": "mqtt-pattern",
"version": "1.1.0",
"version": "1.1.1",
"description": "Fast library for matching MQTT patterns with named wildcards",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -62,2 +62,8 @@ "use strict";

test("matches() ignores leading '/' characters in topics and wildcards", function (t) {
t.plan(2);
t.ok(MQTTPattern.matches("/foo/bar", "foo/bar"), "Matched pattern with leading slash");
t.ok(MQTTPattern.matches("foo/bar", "/foo/bar"), "Matched topic with leading slash");
});
test("extract() returns empty object of there's nothing to extract", function (t) {

@@ -64,0 +70,0 @@ t.plan(1);

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