Finds all files in a directory and passes them into an array. Can specify the name of sub-directory and match a file extension.
npm install list-files
var find = require('list-files');
find(function(result) {
console.log(result);
//=> './dirname/a.js'
//=> './dirname/b.js'
}, {
dir: 'dirname',
name: 'js'
});
Type: function
Called once the search is complete.
Type: object
Optional options. Possible options 'dir', 'name' and 'exclude'.
MIT © Emil Johansson