0.0.7 • Published 11 years ago

separator-stream v0.0.7

Weekly downloads
2
License
-
Repository
-
Last release
11 years ago

separator-stream

separator-stream is a transform stream. When you create it, you have to pass a regular expression (mandatory parameter), then you pipe a regular stream to it, and it should emit data events for every part it got.

Installation

npm install --save separator-stream

Usage

var fs = require('fs');
var Separator = require('separator-stream');

var inputStream = fs.createReadStream('./file');
var separator = new Separator(/splitHere/);
var separated = inputStream.pipe(separator);

separated.on('data', onParts);
function onParts(part) {
  // tadaaa
} 
0.0.7

11 years ago

0.0.6

12 years ago

0.0.5

12 years ago

0.0.4

12 years ago

0.0.3

12 years ago

0.0.2

12 years ago

0.0.1

12 years ago