index.js
function (pattern, options) {
    options = options || {};
    this.pattern = new Pattern(pattern, options);
    this.recurse = this.shouldRecurse(this.pattern, options);

    // if middleware are registered, use the glob, otherwise regex
    var glob = this.fns.length
      ? this.pattern.glob
      : this.pattern.regex;

    this.defaults(glob, options);
    this.include(glob, options);
    return this;
  }
function (pattern, options) {
    options = options || {};
    this.pattern = new Pattern(pattern, options);
    this.recurse = this.shouldRecurse(this.pattern, options);

    // if middleware are registered, use the glob, otherwise regex
    var glob = this.fns.length
      ? this.pattern.glob
      : this.pattern.regex;

    this.defaults(glob, options);
    this.include(glob, options);
    return this;
  }
function ( pattern , options ) { options = options || { } ; this . pattern = new Pattern ( pattern , options ) ; this . recurse = this . shouldRecurse ( this . pattern , options ) ; // if middleware are registered, use the glob, otherwise regex var glob = this . fns . length ? this . pattern . glob : this . pattern . regex ; this . defaults ( glob , options ) ; this . include ( glob , options ) ; return this ; }
Create an instance of `Pattern` from the current glob pattern.

@param {String} `pattern`
@param {Object} `options`
Create an instance of Pattern from the current glob pattern .