1.2.0 • Published 9 years ago

smosh v1.2.0

Weekly downloads
341
License
MIT
Repository
github
Last release
9 years ago

smosh Build Status

A middleware between resmushit and streams on top of vinyl.

How to use?

npm install smosh --save
var smosh = require('smosh'),
    file  = smosh(vinylFile),
    data  = '';

file.on('data', function(chunk) {
    // file chunk stream
    data += chunk;
});

file.on('end', function(newBuffer, info) {
    // vinyl metadata if previously given
    console.log(newBuffer.toString());
    // or if data is streamed
    console.log(data);
    // percentage compressed
    console.log(info.percent)
});

file.on('error', function(err) {
    throw err;
});

License

MIT © Helder Santana

Based on: node-smushit

1.2.0

9 years ago

1.1.0

10 years ago

1.0.0

10 years ago

0.2.1

11 years ago

0.2.0

11 years ago

0.1.0

11 years ago

0.0.3

11 years ago

0.0.2

11 years ago

0.0.1

11 years ago