Skip to content

sonewman/buffer-up

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published