Socket
Socket
Sign inDemoInstall

concat-stream

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

concat-stream - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

9

index.js
var stream = require('stream')
var util = require('util')
var bufferjoiner = require('bufferjoiner')

@@ -29,3 +30,9 @@ function ConcatStream(cb) {

}
if (this.body.length === 1) return this.body[0]
if (typeof(Buffer) !== "undefined" && Buffer.isBuffer(this.body[0])) {
var buffs = new BufferJoiner()
this.body.forEach(function(buf) {
buffs.add(buf)
})
return buffs.join()
}
return this.body

@@ -32,0 +39,0 @@ }

5

package.json
{ "name" : "concat-stream"
, "description" : "writable stream that concatenates strings or data and calls a callback with the result"
, "tags" : ["stream", "simple", "util", "utility"]
, "version" : "0.0.4"
, "version" : "0.0.5"
, "author" : "Max Ogden <max@maxogden.com>"

@@ -13,2 +13,5 @@ , "repository" :

, "engines" : ["node >= 0.4.0"]
, "dependencies": {
"bufferjoiner": "0.1.3"
}
}

@@ -22,3 +22,11 @@ # concat-stream

// data will be [1,2,3,4,5,6] in the above callback
works with buffers too! can't believe the deals!
var write = concat(function(err, data) {})
write.write(new Buffer('hello '))
write.write(new Buffer('world'))
write.end()
// data will be a buffer that toString()s to 'hello world' in the above callback
MIT LICENSE
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc