Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bl

Package Overview
Dependencies
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bl - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

12

bl.js

@@ -60,4 +60,10 @@ var DuplexStream = require('readable-stream/duplex')

this._bufs.push(isBuffer ? buf : new Buffer(buf))
this.length += buf.length
if (buf instanceof BufferList) {
this._bufs.push.apply(this._bufs, buf._bufs)
this.length += buf.length
} else {
this._bufs.push(isBuffer ? buf : new Buffer(buf))
this.length += buf.length
}
return this

@@ -166,3 +172,3 @@ }

while (this._bufs.length) {
if (bytes > this._bufs[0].length) {
if (bytes >= this._bufs[0].length) {
bytes -= this._bufs[0].length

@@ -169,0 +175,0 @@ this.length -= this._bufs[0].length

{
"name": "bl",
"version": "1.0.2",
"version": "1.0.3",
"description": "Buffer List: collect buffers and access with a standard readable Buffer interface, streamable too!",

@@ -30,6 +30,6 @@ "main": "bl.js",

"devDependencies": {
"tape": "~2.12.3",
"faucet": "0.0.1",
"hash_file": "~0.1.1",
"faucet": "~0.0.1"
"tape": "~4.4.0"
}
}

@@ -131,2 +131,16 @@ var tape = require('tape')

tape('complete consumption', function (t) {
var bl = new BufferList()
bl.append(new Buffer('a'))
bl.append(new Buffer('b'))
bl.consume(2)
t.equal(bl.length, 0)
t.equal(bl._bufs.length, 0)
t.end()
})
tape('test readUInt8 / readInt8', function (t) {

@@ -133,0 +147,0 @@ var buf1 = new Buffer(1)

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