1.0.4 • Published 9 years ago

transform-split v1.0.4

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

transform-split

Build Status Coverage Status NPM version

A transform stream that splits an incoming stream based on a delimiter.

Installation

$ npm install transform-split --save

Example

var stream = require('stream');
var split = require('transform-split');
var source = stream.PassThrough();
var dest = stream.PassThrough();

source.pipe(split()).pipe(dest);
    
source.write(new Buffer('Bibendum'));
source.write(new Buffer(' Vestibulum'));
source.end(new Buffer('\nPurus'));

dest.on('data', function(chunk){
  // => Bibendum Vestibulum
  console.log(chunk.toString());
});

API

var split = transformSplit(delimiter)

Initialise a new TransformSplit with the given delimiter.

Testing

$ npm run test-spec

To generate a coverage report:

$ npm run test-cov

Credits

  • urlgrey for the Makefile inspiration.
1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago

0.2.2

10 years ago

0.2.1

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.2.0

10 years ago

0.1.0

10 years ago