Socket
Socket
Sign inDemoInstall

minipass

Package Overview
Dependencies
Maintainers
1
Versions
94
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

minipass - npm Package Compare versions

Comparing version 1.1.5 to 1.1.6

.nyc_output/2653bb034fa562cf6b0244c19118be63.json

4

index.js

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

return this[READ](n, this.buffer.head.value)
return this[READ](n || null, this.buffer.head.value)
} finally {

@@ -81,3 +81,3 @@ this[MAYBE_EMIT_END]()

return null
else if (n === chunk.length)
else if (n === chunk.length || n === null)
this.buffer.pop()

@@ -84,0 +84,0 @@ else {

{
"name": "minipass",
"version": "1.1.5",
"version": "1.1.6",
"description": "minimal implementation of a PassThrough stream",

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

@@ -106,2 +106,12 @@ const MiniPass = require('../')

t.test('read with no args', async t => {
const butterfly = '🦋'
const mp = new MiniPass({ encoding: 'utf8' })
mp.on('data', c => t.equal(c, butterfly))
mp.pause()
mp.write(new Buffer(butterfly))
t.same(mp.read(), new Buffer(butterfly))
t.equal(mp.read(), null)
})
t.test('partial read', async t => {

@@ -108,0 +118,0 @@ const butterfly = '🦋'

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