wc-through
v1.0.0
Published
unix wc core util as a through stream, counts into an object
Downloads
2
Readme
SYNOPSIS
unix wc core util as a through stream, counts into an object
USAGE
as data passes though it increments the counter
var counters = {}
fs.createReadStream('./foo.txt')
.pipe(wc(counters))
.on('end', function() {
console.log(counters)
})
the result is something like this
{ "ccount": 219127, "wcount": 32584, "lcount": 655 }