code: function pathFilter(filter){
  
  
    if (isFunction(filter)) {
  
      return filter;
  
    } else if (isString(filter)) {
  
      return function (entryInfo) {
        return minimatch(entryInfo. path, filter.trim());
      };
  
    } else if (filter && Array.isArray(filter)) {
  
      if (filter) filter = filter.map(function (f) {
        return f.trim();
      });
  
      return allNegated(filter) ?
        // use AND to concat multiple negated filters
        function (entryInfo) {
          return filter.every(function (f) {
            return minimatch(entryInfo.path, f);
          });
        }
        :
        // use OR to concat multiple inclusive filters
        function (entryInfo) {
          return filter.some(function (f) {
            return minimatch(entryInfo.path, f);
          });
        };
    }
  }
docs: //////