function isIgnored(fp, patterns) {
  return patterns.some(function(ip) {
    if (minimatch(path.resolve(fp), ip, { nocase: true, dot: true })) {
      return true;
    }

    if (path.resolve(fp) === ip) {
      return true;
    }

    if (fsUtils.isDirectory(fp) && ip.match(/^[^\/\\]*[\/\\]?$/) &&
      fp.match(new RegExp("^" + ip + ".*"))) {
      return true;
    }
  });
}
Checks whether we should ignore a file or not.

@param {string} fp       a path to a file
@param {array}  patterns a list of patterns for files to ignore

@return {boolean} 'true' if file should be ignored, 'false' otherwise.