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

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 2.2.3 to 2.2.4

15

index.js

@@ -21,2 +21,11 @@ 'use strict'

// Buffer in node 4.x < 4.5.0 doesn't have working Buffer.from
// or Buffer.alloc, and Buffer in node 10 deprecated the ctor.
// .M, this is fine .\^/M..
let B = Buffer
/* istanbul ignore next */
if (!B.alloc) {
B = require('safe-buffer').Buffer
}
class MiniPass extends EE {

@@ -83,6 +92,6 @@ constructor (options) {

!(encoding === this[ENCODING] && !this[DECODER].lastNeed)) {
chunk = Buffer.from(chunk, encoding)
chunk = B.from(chunk, encoding)
}
if (Buffer.isBuffer(chunk) && this[ENCODING])
if (B.isBuffer(chunk) && this[ENCODING])
chunk = this[DECODER].write(chunk)

@@ -116,3 +125,3 @@

this.buffer = new Yallist([
Buffer.concat(Array.from(this.buffer), this[BUFFERLENGTH])
B.concat(Array.from(this.buffer), this[BUFFERLENGTH])
])

@@ -119,0 +128,0 @@ }

3

package.json
{
"name": "minipass",
"version": "2.2.3",
"version": "2.2.4",
"description": "minimal implementation of a PassThrough stream",
"main": "index.js",
"dependencies": {
"safe-buffer": "^5.1.1",
"yallist": "^3.0.0"

@@ -8,0 +9,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