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 0.3.0 to 0.4.0

2

bl.js

@@ -37,3 +37,3 @@ const DuplexStream = require('readable-stream/duplex')

BufferList.prototype.append = function (buf) {
this._bufs.push(buf)
this._bufs.push(Buffer.isBuffer(buf) ? buf : new Buffer(buf))
this.length += buf.length

@@ -40,0 +40,0 @@ return this

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

@@ -5,0 +5,0 @@ , "main" : "bl.js"

@@ -17,3 +17,3 @@ # bl *(BufferList)*

bl.append(new Buffer('efg'))
bl.append(new Buffer('hi'))
bl.append('hi') // bl will also accept & convert Strings
bl.append(new Buffer('j'))

@@ -20,0 +20,0 @@ bl.append(new Buffer([ 0x3, 0x4 ]))

@@ -303,1 +303,19 @@ const tape = require('tape')

tape('test String appendage', function (t) {
var bl = new BufferList()
, b = new Buffer('abcdefghij\xff\x00')
bl.append('abcd')
bl.append('efg')
bl.append('hi')
bl.append('j')
bl.append('\xff\x00')
'hex utf8 utf-8 ascii binary base64 ucs2 ucs-2 utf16le utf-16le'
.split(' ')
.forEach(function (enc) {
t.equal(bl.toString(enc), b.toString(enc))
})
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