dist/grep.js
function walkDirRecursive(arr, currentDirPath) {
  fs.readdirSync(currentDirPath).forEach(function (name) {
    var filePath = path.join(currentDirPath, name);
    var stat = fs.statSync(filePath);
    if (stat.isDirectory()) {
      arr = walkDirRecursive(arr, filePath);
    } else {
      arr.push(filePath);
    }
  });
  return arr;
}
function walkDirRecursive(arr, currentDirPath) {
  fs.readdirSync(currentDirPath).forEach(function (name) {
    var filePath = path.join(currentDirPath, name);
    var stat = fs.statSync(filePath);
    if (stat.isDirectory()) {
      arr = walkDirRecursive(arr, filePath);
    } else {
      arr.push(filePath);
    }
  });
  return arr;
}
function walkDirRecursive ( arr , currentDirPath ) { fs . readdirSync ( currentDirPath ) . forEach ( function ( name ) { var filePath = path . join ( currentDirPath , name ) ; var stat = fs . statSync ( filePath ) ; if ( stat . isDirectory ( ) ) { arr = walkDirRecursive ( arr , filePath ) ; } else { arr . push ( filePath ) ; } } ) ; return arr ; }
Recursively walks through and executes
a callback function for each directory found.

@param {String} currentDirPath
@param {Function} callback
@api private
Recursively walks through and executes a callback function for each directory found .