lib/qlobber.js
function Qlobber (options)
{
    options = options || {};

    this._separator = options.separator || '.';
    this._wildcard_one = options.wildcard_one || '*';
    this._wildcard_some = options.wildcard_some || '#';
    this._trie = new Map();
    if (options.cache_adds instanceof Map)
    {
        this._shortcuts = options.cache_adds;
    }
    else if (options.cache_adds)
    {
        this._shortcuts = new Map();
    }
}
function Qlobber (options)
{
    options = options || {};

    this._separator = options.separator || '.';
    this._wildcard_one = options.wildcard_one || '*';
    this._wildcard_some = options.wildcard_some || '#';
    this._trie = new Map();
    if (options.cache_adds instanceof Map)
    {
        this._shortcuts = options.cache_adds;
    }
    else if (options.cache_adds)
    {
        this._shortcuts = new Map();
    }
}
function Qlobber ( options ) { options = options || { } ; this . _separator = options . separator || '.' ; this . _wildcard_one = options . wildcard_one || '*' ; this . _wildcard_some = options . wildcard_some || '#' ; this . _trie = new Map ( ) ; if ( options . cache_adds instanceof Map ) { this . _shortcuts = options . cache_adds ; } else if ( options . cache_adds ) { this . _shortcuts = new Map ( ) ; } }
Creates a new qlobber.

@constructor
@param {Object} [options] Configures the qlobber. Use the following properties:
- `{String} separator` The character to use for separating words in topics. Defaults to '.'. MQTT uses '/' as the separator, for example.

- `{String} wildcard_one` The character to use for matching exactly one word in a topic. Defaults to '*'. MQTT uses '+', for example.

- `{String} wildcard_some` The character to use for matching zero or more words in a topic. Defaults to '#'. MQTT uses '#' too.

- `{Boolean|Map} cache_adds` Whether to cache topics when adding topic matchers. This will make adding multiple matchers for the same topic faster at the cost of extra memory usage. Defaults to `false`. If you supply a `Map` then it will be used to cache the topics (use this to enumerate all the topics in the qlobber).
Creates a new qlobber .