Commit project
This commit is contained in:
parent
28471965a0
commit
3ac017a5ad
1030 changed files with 94062 additions and 0 deletions
15
node_modules/readdirp/examples/stream-api.js
generated
vendored
Normal file
15
node_modules/readdirp/examples/stream-api.js
generated
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
var readdirp = require('..')
|
||||
, path = require('path');
|
||||
|
||||
readdirp({ root: path.join(__dirname), fileFilter: '*.js' })
|
||||
.on('warn', function (err) {
|
||||
console.error('something went wrong when processing an entry', err);
|
||||
})
|
||||
.on('error', function (err) {
|
||||
console.error('something went fatally wrong and the stream was aborted', err);
|
||||
})
|
||||
.on('data', function (entry) {
|
||||
console.log('%s is ready for processing', entry.path);
|
||||
// process entry here
|
||||
});
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue