Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Streaming implementation of wc for Node.js
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
examples
.gitignore
README.md
index.js
package.json

README.md

wc-stream

Streaming implementation of Unix's wc, written in pure JavaScript

Installation

$ npm install wc-stream

Example

var fs = require('fs')
  , wc = require('wc-stream');

var lineCount = wc('line');

fs.createReadStream('./example.txt')
  .pipe(lineCount)
  .pipe(process.stdout);

Usage

wc(quant)

Count streamed input by quant, either 'char', 'line', or 'word'.

License

The MIT License

Something went wrong with that request. Please try again.