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 2.1.0 to 2.1.1

4

index.js

@@ -48,7 +48,7 @@ 'use strict'

if (this[OBJECTMODE])
this.emit('error', new Error('cannot set encoding in objectMode'))
throw new Error('cannot set encoding in objectMode')
if (this[ENCODING] && enc !== this[ENCODING] &&
(this[DECODER] && this[DECODER].lastNeed || this[BUFFERLENGTH]))
this.emit('error', new Error('cannot change encoding'))
throw new Error('cannot change encoding')

@@ -55,0 +55,0 @@ if (this[ENCODING] !== enc) {

{
"name": "minipass",
"version": "2.1.0",
"version": "2.1.1",
"description": "minimal implementation of a PassThrough stream",

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

@@ -6,2 +6,6 @@ # minipass

[It's very
fast](https://docs.google.com/spreadsheets/d/1oObKSrVwLX_7Ut4Z6g3fZW-AX1j1-k6w-cDsrkaSbHM/edit#gid=0)
for objects, strings, and buffers.
Supports pipe()ing (including multi-pipe() and backpressure

@@ -22,5 +26,2 @@ transmission), buffering data until either a `data` event handler or

This is not a `through` or `through2` stream. It doesn't transform
the data, it just passes it right through.
If you set `objectMode: true` in the options, then whatever is written

@@ -30,2 +31,8 @@ will be emitted. Otherwise, it'll do a minimal amount of Buffer

This is not a `through` or `through2` stream. It doesn't transform
the data, it just passes it right through. If you want to transform
the data, extend the class, and override the `write()` method. Once
you're done transforming the data however you want, call
`super.write()` with the transform output.
For an example of a stream that extends MiniPass to provide transform

@@ -32,0 +39,0 @@ capabilities, check out [minizlib](http://npm.im/minizlib).

Sorry, the diff of this file is not supported yet

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