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

bl

Package Overview
Dependencies
Maintainers
2
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 4.0.4 to 4.1.0

2

BufferList.js

@@ -376,3 +376,3 @@ 'use strict'

} else {
BufferList.prototype[m] = function (offset) {
BufferList.prototype[m] = function (offset = 0) {
return this.slice(offset, offset + methods[m])[m](0)

@@ -379,0 +379,0 @@ }

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

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -268,2 +268,3 @@ 'use strict'

buf1[0] = 0x1
buf2[1] = 0x3

@@ -278,2 +279,3 @@ buf2[2] = 0x4

t.equal(bl.readUInt8(), 0x1)
t.equal(bl.readUInt8(2), 0x3)

@@ -297,2 +299,3 @@ t.equal(bl.readInt8(2), 0x3)

buf1[0] = 0x1
buf2[1] = 0x3

@@ -307,2 +310,4 @@ buf2[2] = 0x4

t.equal(bl.readUInt16BE(), 0x0100)
t.equal(bl.readUInt16LE(), 0x0001)
t.equal(bl.readUInt16BE(2), 0x0304)

@@ -330,2 +335,3 @@ t.equal(bl.readUInt16LE(2), 0x0403)

buf1[0] = 0x1
buf2[1] = 0x3

@@ -340,2 +346,4 @@ buf2[2] = 0x4

t.equal(bl.readUInt32BE(), 0x01000304)
t.equal(bl.readUInt32LE(), 0x04030001)
t.equal(bl.readUInt32BE(2), 0x03042342)

@@ -400,2 +408,3 @@ t.equal(bl.readUInt32LE(2), 0x42230403)

buf1[0] = 0x01
buf2[1] = 0x00

@@ -410,3 +419,7 @@ buf2[2] = 0x00

t.equal(bl.readFloatLE(2), 0x01)
const canonical = Buffer.concat([buf1, buf2, buf3])
t.equal(bl.readFloatLE(), canonical.readFloatLE())
t.equal(bl.readFloatBE(), canonical.readFloatBE())
t.equal(bl.readFloatLE(2), canonical.readFloatLE(2))
t.equal(bl.readFloatBE(2), canonical.readFloatBE(2))

@@ -422,2 +435,3 @@ t.end()

buf1[0] = 0x01
buf2[1] = 0x55

@@ -436,3 +450,7 @@ buf2[2] = 0x55

t.equal(bl.readDoubleLE(2), 0.3333333333333333)
const canonical = Buffer.concat([buf1, buf2, buf3])
t.equal(bl.readDoubleBE(), canonical.readDoubleBE())
t.equal(bl.readDoubleLE(), canonical.readDoubleLE())
t.equal(bl.readDoubleBE(2), canonical.readDoubleBE(2))
t.equal(bl.readDoubleLE(2), canonical.readDoubleLE(2))

@@ -439,0 +457,0 @@ t.end()

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