code: function shouldIgnore(filename, ignore, only) {
    filename = _slash2["default"](filename);
  
    if (only) {
      var _arr = only;
  
      for (var _i = 0; _i < _arr.length; _i++) {
        var pattern = _arr[_i];
        if (_shouldIgnore(pattern, filename)) return false;
      }
      return true;
    } else if (ignore.length) {
      var _arr2 = ignore;
  
      for (var _i2 = 0; _i2 < _arr2.length; _i2++) {
        var pattern = _arr2[_i2];
        if (_shouldIgnore(pattern, filename)) return true;
      }
    }
  
    return false;
  }
docs: Tests if a filename should be ignored based on "ignore" and "only" options.