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.0.2 to 1.1.0

.nyc_output/21b6e38712d2d70095ec98cbcdf1a0a5.json

9

index.js

@@ -0,1 +1,2 @@

'use strict'
const EE = require('events')

@@ -23,3 +24,3 @@ const Yallist = require('yallist')

write (chunk, encoding = 'utf8', cb = null) {
write (chunk, encoding, cb) {
if (this[EOF])

@@ -73,8 +74,10 @@ throw new Error('write after end')

end (chunk) {
end (chunk, encoding, cb) {
if (chunk)
this.write(chunk)
this.write(chunk, encoding)
this[EOF] = true
if (this.flowing)
this[MAYBE_EMIT_END]()
if (cb)
cb()
}

@@ -81,0 +84,0 @@

{
"name": "minipass",
"version": "1.0.2",
"version": "1.1.0",
"description": "minimal implementation of a PassThrough stream",

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

@@ -118,5 +118,7 @@ const MiniPass = require('../')

mp.addEventHandler('data', c => out += c)
mp.end('ok')
let endCb = false
mp.end('ok', 'utf8', _ => endCb = true)
t.equal(out, 'ok')
t.ok(sawEnd, 'should see end event')
t.ok(endCb, 'end cb should get called')
})

@@ -123,0 +125,0 @@

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