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.4.1 to 0.4.2

6

bl.js

@@ -56,3 +56,5 @@ const DuplexStream = require('stream').DuplexStream || require('readable-stream/duplex')

BufferList.prototype.end = function () {
BufferList.prototype.end = function (chunk) {
DuplexStream.prototype.end.call(this, chunk)
if (this._callback)

@@ -156,2 +158,2 @@ this._callback(null, this.slice())

module.exports = BufferList
module.exports = BufferList
{
"name" : "bl"
, "version" : "0.4.1"
, "version" : "0.4.2"
, "description" : "Buffer List: collect buffers and access with a standard readable Buffer interface, streamable too!"

@@ -16,2 +16,3 @@ , "main" : "bl.js"

"Rod Vagg <rod@vagg.org> (https://github.com/rvagg)"
, "Matteo Collina <matteo.collina@gmail.com> (https://github.com/mcollina)"
]

@@ -32,2 +33,2 @@ , "keywords" : [

}
}
}

@@ -156,4 +156,11 @@ # bl *(BufferList)*

## Contributors
**bl** is brought to you by the following hackers:
* [Rod Vagg](https://github.com/rvagg)
* [Matteo Collina](https://github.com/mcollina)
## License
**bl** is Copyright (c) 2013 Rod Vagg [@rvagg](https://twitter.com/rvagg) and licenced under the MIT licence. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details.
**bl** is Copyright (c) 2013 Rod Vagg [@rvagg](https://twitter.com/rvagg) and licenced under the MIT licence. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details.

@@ -321,1 +321,37 @@ const tape = require('tape')

})
tape('write nothing, should get empty buffer', function (t) {
t.plan(3)
BufferList(function (err, data) {
t.notOk(err, 'no error')
t.ok(Buffer.isBuffer(data), 'got a buffer')
t.equal(0, data.length, 'got a zero-length buffer')
t.end()
}).end()
})
tape('unicode string', function (t) {
t.plan(2)
var inp1 = '\u2600'
, inp2 = '\u2603'
, exp = inp1 + ' and ' + inp2
, bl = BufferList()
bl.write(inp1)
bl.write(' and ')
bl.write(inp2)
t.equal(exp, bl.toString())
t.equal(new Buffer(exp).toString('hex'), bl.toString('hex'))
})
tape('should emit finish', function (t) {
var source = BufferList()
, dest = BufferList()
source.write('hello')
source.pipe(dest)
dest.on('finish', function () {
t.equal(dest.toString('utf8'), 'hello')
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