2.0.0 • Published 11 years ago

bupper v2.0.0

Weekly downloads
10
License
-
Repository
github
Last release
11 years ago

bupper

A Nodejs Buffer helper.

Installation

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"
  }
}

Quick Start

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

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

APIs

Concat chunks:

Bupper.add(chunk)

Output chunks:

Bupper.combine()

Todo

  • write a test
2.0.0

11 years ago

0.1.0

11 years ago