bupper

A Nodejs Buffer helper

bupper

A Nodejs Buffer helper.

Use npm:

npm install git://github.com/shallker-wang/bupper.git

Or add to your package dependencies:

{
  "dependencies": {
    "bupper": "git://github.com/shallker-wang/bupper.git"
  }
}

Concat buffer chunks with .add(chunk) and output them together using .combine()

var Bupper = require('bupper');
var http = require('http');
http.createServer(function(reqres) {
  req.on('data', function(chunk) {
    Bupper.add(chunk);
  });
  req.on('end', function() {
    console.log( Bupper.combine().toString() )
  })
}).listen(80);

Concat chunks:

Bupper.add(chunk)

Output chunks:

Bupper.combine()
  • write a test