I\'m using the npm module node-glob.
This snippet returns recursively all files in the current working directory.
var glob = require(\'glob\'); glob(
Check out globby, which is pretty much glob with support for multiple patterns and a Promise API:
const globby = require('globby'); globby(['**/*', '!index.html', '!js/lib.js']).then(paths => { console.log(paths); });