mqtt-match
TypeScript icon, indicating that this package has built-in type declarations

3.0.0 • Public • Published

mqtt-match

Match mqtt formatted topic strings to strings

npm Node version Node.js CI JavaScript Style Guide

Usage

const match = require('mqtt-match')
console.log(match('foo/+', 'foo/bar'))
// true

Api

match(filter, topic[, handleSharedSubscription])

  • filter (string) - mqtt filter topic, e.g. foo/+/bar
  • topic (string) - topic string, e.g. foo/314/bar
  • handleSharedSubscription (boolean) - set to true if handling $share/ filter topics

License

MIT

Dependencies (0)

    Dev Dependencies (2)

    Package Sidebar

    Install

    npm i mqtt-match

    Weekly Downloads

    6,871

    Version

    3.0.0

    License

    MIT

    Unpacked Size

    5.37 kB

    Total Files

    7

    Last publish

    Collaborators

    • ralphtheninja