callback-api.js 250 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 var readdirp = require('..'); readdirp({ root: '.', fileFilter: '*.js' }, function (errors, res) { if (errors) { errors.forEach(function (err) { console.error('Error: ', err); }); } console.log('all javascript files', res); });