Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

buffer-stream-reader

0.1.1 • Public • Published

buffer-stream-reader

Naive node.js buffer stream reader

 
var BufferStreamReader = require('buffer-stream-reader');
    
var buffer = new Buffer('word1 word2 word3');
var reader = new BufferStreamReader(buffer, { encoding: 'utf8' });
 
reader.on('readable', function onReadable () {
  while ((chunk = reader.read()) !== null) {
    console.log(chunk.toSring()); // Should print 'word1 word2 word3'
  }
});

Keywords

none

install

npm i buffer-stream-reader

Downloadsweekly downloads

560

version

0.1.1

license

none

last publish

collaborators

  • avatar