lib/ignore-deps.js
function loadIgnoreFile(filepath) {
  var ignoredDeps = [];

  /**
     * Check if string is not empty
     * @param {string} line string to examine
     * @returns {boolean} True is its not empty
     * @private
     */
  function nonEmpty(line) {
    return line.trim() !== '' && line[0] !== '#';
  }

  if (filepath) {
    try {
      ignoredDeps = fs.readFileSync(filepath, 'utf8')
        .split(/\r?\n/)
        .filter(nonEmpty);
    } catch (e) {
      e.message = 'Cannot read ignore file: ' + filepath + '\nError: ' + e.message;
      throw e;
    }
  }

  return ignoredDeps;
}
function loadIgnoreFile(filepath) {
  var ignoredDeps = [];

  /**
     * Check if string is not empty
     * @param {string} line string to examine
     * @returns {boolean} True is its not empty
     * @private
     */
  function nonEmpty(line) {
    return line.trim() !== '' && line[0] !== '#';
  }

  if (filepath) {
    try {
      ignoredDeps = fs.readFileSync(filepath, 'utf8')
        .split(/\r?\n/)
        .filter(nonEmpty);
    } catch (e) {
      e.message = 'Cannot read ignore file: ' + filepath + '\nError: ' + e.message;
      throw e;
    }
  }

  return ignoredDeps;
}
function loadIgnoreFile ( filepath ) { var ignoredDeps = [ ] ; /**
     * Check if string is not empty
     * @param {string} line string to examine
     * @returns {boolean} True is its not empty
     * @private
     */ function nonEmpty ( line ) { return line . trim ( ) !== '' && line [ 0 ] !== '#' ; } if ( filepath ) { try { ignoredDeps = fs . readFileSync ( filepath , 'utf8' ) . split ( / \r?\n / ) . filter ( nonEmpty ) ; } catch ( e ) { e . message = 'Cannot read ignore file: ' + filepath + '\nError: ' + e . message ; throw e ; } } return ignoredDeps ; }
Load and parse ignore dependencies from the file at the given path
@param {string} filepath Path to the ignore file.
@returns {string[]} An array of ignore dependencies or an empty array if no ignore file.
Load and parse ignore dependencies from the file at the given path