mqtt-wildcard
Match a MQTT Topic against Wildcards
Install and Usage
$ npm install mqtt-wildcard
var mqttWildcard = ;
Alternatively you can use bower to install mqtt-wildcard, AMD is also supported.
API
array|null mqttWildcard (string topic, string wildcard)
Returns null
if not matched, otherwise an array containing the wildcards contents will be returned.
Examples:
; // []; // ['foo']; // ['foo/bar']; // ['foo', 'bar/baz']; // ['foo', 'bar'] ; // []; // [''] ; // null; // null
License
MIT (c) 2017 Sebastian Raff