code: function watchFilter(fileName) {
    var watchDirectory = this.watchDirectory,//this is array if multiple --watchDirectory options given, treat as array always
        result = true;
  
    if (!Array.isArray(watchDirectory)) {
      watchDirectory = [watchDirectory];
    }
  
    watchDirectory.forEach(function(directory) {
      var relFileName = path.relative(directory, fileName),
          length = this.watchIgnorePatterns.length,
          testName,
          i;
  
      if (this.watchIgnoreDotFiles && path.basename(fileName)[0] === '.') {
        result = false;
      }
  
      for (i = 0; i < length; i++) {
        if (this.watchIgnorePatterns[i].length > 0) {
          testName = (this.watchIgnorePatterns[i].charAt(0) !== '/') ? relFileName : fileName;
          if (minimatch(testName, this.watchIgnorePatterns[i], { matchBase: directory })) {
            result = false;
          }
        }
      }
    }.bind(this));
  
    return result;
  }
docs: ### @private function _watchFilter #### @file {string} File name Determines whether we should restart if `file` change (@mikeal's filtering is pretty messed up).