mqtt-pattern
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -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; |
{ | ||
"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); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
207
12690
6