1.0.2 • Published 10 years ago

stream-line-pairwise v1.0.2

Weekly downloads
3
License
MIT
Repository
github
Last release
10 years ago

stream-line-pairwise

outputs pairs of lines

install

npm install stream-line-pairwise

use

var createPairwiseStream = require('./stream-line-pairwise');

var s = createPairwiseStream({
  object: false, // false is the default
  delimiter: '=' // default is ':'
})

s.on('data', function(line) {
  console.log(line); // outputs: me=robot
})

s.end('me\nrobot');

options

object - if truthy, a stream of arrays will be emitted (default: false)

delimiter - if truthy, each pair of lines will be Array#join'd with this value (default: :)

encoding - changes the encoding of the output (default: utf8)

license

MIT LICENSE