code: function hasMagic(pattern, options) {
    // Support RegExp as well as glob
    if (pattern instanceof RegExp) {
      return {
        match: function match(str) {
          return pattern.test(str);
        }
      };
    }
  
    var minimatch = new _minimatch.Minimatch(pattern, options);
    var set = minimatch.set;
  
    if (set.length > 1) {
      return minimatch;
    }
  
    for (var j = 0; j < set[0].length; j++) {
      if (typeof set[0][j] !== 'string') {
        return minimatch;
      }
    }
  
    return false;
  }
docs: Based on https://github.com/isaacs/node-glob/blob/master/glob.js#L83 (glob.hasMagic)