sizeist

1.0.1 • Public • Published

sizeist

sizeist takes a readable stream and emits its size (in bytes) at various stages of compression. This is useful for quickly determining the real-world size of a given module.

Build status

Install

$ npm install sizeist

Usage

var fs = require('fs')
var sizeist = require('sizeist')
 
function log (type) {
  return console.log.bind(console, type)
}
 
sizeist(fs.createReadStream('usage.js'))
  .on('size', log('size'))
  .on('size:uglify', log('size:uglify'))
  .on('size:uglify:gzip', log('size:uglify:gzip'))
  .on('finish', log('done'))
 
// Output:
// size 387
// size:uglify 273
// size:uglify:gzip 168
// done

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i sizeist

Weekly Downloads

19

Version

1.0.1

License

MIT

Last publish

Collaborators

  • michaelrhodes