Sha256: 7a04d9ea444359b2178e4c4f5b2c7e09f41eda0748dacf34ec87b73fc1988501
Contents?: true
Size: 618 Bytes
Versions: 100
Compression:
Stored size: 618 Bytes
Contents
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);
Version data entries
100 entries across 100 versions & 14 rubygems