diff options
Diffstat (limited to 'node_modules/readdirp/examples/stream-api-pipe.js')
-rw-r--r-- | node_modules/readdirp/examples/stream-api-pipe.js | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/node_modules/readdirp/examples/stream-api-pipe.js b/node_modules/readdirp/examples/stream-api-pipe.js deleted file mode 100644 index 4003be8d3..000000000 --- a/node_modules/readdirp/examples/stream-api-pipe.js +++ /dev/null @@ -1,19 +0,0 @@ -var readdirp = require('..') - , path = require('path') - , through = require('through2') - -// print out all JavaScript files along with their size -readdirp({ root: path.join(__dirname), fileFilter: '*.js' }) - .on('warn', function (err) { console.error('non-fatal error', err); }) - .on('error', function (err) { console.error('fatal error', err); }) - .pipe(through.obj(function (entry, _, cb) { - this.push({ path: entry.path, size: entry.stat.size }); - cb(); - })) - .pipe(through.obj( - function (res, _, cb) { - this.push(JSON.stringify(res) + '\n'); - cb(); - }) - ) - .pipe(process.stdout); |