concat-stream
Advanced tools
Comparing version 1.1.0 to 1.2.0
@@ -35,3 +35,3 @@ var stream = require('stream') | ||
ConcatStream.prototype.getBody = function () { | ||
if (this.body.length === 0) return | ||
if (this.body.length === 0) return bops.from(0) | ||
if (typeof(this.body[0]) === "string") return this.body.join('') | ||
@@ -43,3 +43,4 @@ if (this.isArray(this.body[0])) return this.arrayConcat(this.body) | ||
ConcatStream.prototype.end = function() { | ||
ConcatStream.prototype.end = function(chunk) { | ||
if (chunk) this.write(chunk) | ||
this.emit('end') | ||
@@ -46,0 +47,0 @@ if (this.cb) this.cb(this.getBody()) |
@@ -10,3 +10,3 @@ { | ||
], | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"author": "Max Ogden <max@maxogden.com>", | ||
@@ -13,0 +13,0 @@ "repository": { |
@@ -45,1 +45,9 @@ var spawn = require('child_process').spawn | ||
emitter.end() | ||
// chunk passed to end | ||
var endchunk = concat(function(out) { | ||
console.log('strings', out) | ||
}) | ||
endchunk.write("this ") | ||
endchunk.write("is the ") | ||
endchunk.end("end") |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4786
88