Comparing version 1.0.0 to 1.0.1
@@ -55,2 +55,7 @@ var DuplexStream = require('readable-stream/duplex') | ||
// coerce number arguments to strings, since Buffer(number) does | ||
// uninitialized memory allocation | ||
if (typeof buf == 'number') | ||
buf = buf.toString() | ||
this._bufs.push(isBuffer ? buf : new Buffer(buf)) | ||
@@ -57,0 +62,0 @@ this.length += buf.length |
{ | ||
"name": "bl", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Buffer List: collect buffers and access with a standard readable Buffer interface, streamable too!", | ||
@@ -28,3 +28,3 @@ "main": "bl.js", | ||
"dependencies": { | ||
"readable-stream": "~2.0.0" | ||
"readable-stream": "~2.0.5" | ||
}, | ||
@@ -31,0 +31,0 @@ "devDependencies": { |
@@ -339,2 +339,18 @@ var tape = require('tape') | ||
tape('test Number appendage', function (t) { | ||
var bl = new BufferList() | ||
, b = new Buffer('1234567890') | ||
bl.append(1234) | ||
bl.append(567) | ||
bl.append(89) | ||
bl.append(0) | ||
encodings.forEach(function (enc) { | ||
t.equal(bl.toString(enc), b.toString(enc)) | ||
}) | ||
t.end() | ||
}) | ||
tape('write nothing, should get empty buffer', function (t) { | ||
@@ -341,0 +357,0 @@ t.plan(3) |
Sorry, the diff of this file is not supported yet
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
33926
657
Updatedreadable-stream@~2.0.5