buffer-up

1.0.0 • Public • Published

Buffer-Up

Install:

$ npm i -S buffer-up

Buffer-up is a very simple module to use, it is basically to reduce the boilerplate code, which is needed when you have a stream and you want to concat the data emitted into a string and get the data out then end either as a string or if the data is json then as an object.

It is really as simple as that!

var bufferUp = require('buffer-up')

var bufferContent = bufferUp(function (err, content) {
  if (!err) doSomethingWithContent(content)
})

require('http').get('http://www.example.com', function (res) {
  res.pipe(bufferContent)
})

Readme

Keywords

Package Sidebar

Install

npm i buffer-up

Weekly Downloads

2

Version

1.0.0

License

ISC

Last publish

Collaborators

  • sonewman