index.js
function getDirectories(path){
  return fs.readdirSync(path).filter(function (file) {
    return fs.statSync(path + "/" + file).isDirectory();
  });	
}
function getDirectories(path){
  return fs.readdirSync(path).filter(function (file) {
    return fs.statSync(path + "/" + file).isDirectory();
  });	
}
function getDirectories ( path ) { return fs . readdirSync ( path ) . filter ( function ( file ) { return fs . statSync ( path + "/" + file ) . isDirectory ( ) ; } ) ; }
Returns a list of all directories in a parent directory
@param {string} path The path of the parent directory
@return {array} An array with a list of directories
Returns a list of all directories in a parent directory