Socket
Socket
Sign inDemoInstall

minipass

Package Overview
Dependencies
Maintainers
7
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 4.2.7 to 5.0.0

35

index.d.ts

@@ -9,6 +9,6 @@ /// <reference types="node" />

declare namespace Minipass {
type Encoding = BufferEncoding | 'buffer' | null
export namespace Minipass {
export type Encoding = BufferEncoding | 'buffer' | null
interface Writable extends EventEmitter {
export interface Writable extends EventEmitter {
end(): any

@@ -18,3 +18,3 @@ write(chunk: any, ...args: any[]): any

interface Readable extends EventEmitter {
export interface Readable extends EventEmitter {
pause(): any

@@ -25,9 +25,13 @@ resume(): any

type DualIterable<T> = Iterable<T> & AsyncIterable<T>
export type DualIterable<T> = Iterable<T> & AsyncIterable<T>
type ContiguousData = Buffer | ArrayBufferLike | ArrayBufferView | string
export type ContiguousData =
| Buffer
| ArrayBufferLike
| ArrayBufferView
| string
type BufferOrString = Buffer | string
export type BufferOrString = Buffer | string
interface SharedOptions {
export interface SharedOptions {
async?: boolean

@@ -37,3 +41,3 @@ signal?: AbortSignal

interface StringOptions extends SharedOptions {
export interface StringOptions extends SharedOptions {
encoding: BufferEncoding

@@ -43,3 +47,3 @@ objectMode?: boolean

interface BufferOptions extends SharedOptions {
export interface BufferOptions extends SharedOptions {
encoding?: null | 'buffer'

@@ -49,7 +53,7 @@ objectMode?: boolean

interface ObjectModeOptions extends SharedOptions {
export interface ObjectModeOptions extends SharedOptions {
objectMode: true
}
interface PipeOptions {
export interface PipeOptions {
end?: boolean

@@ -59,3 +63,3 @@ proxyErrors?: boolean

type Options<T> = T extends string
export type Options<T> = T extends string
? StringOptions

@@ -67,3 +71,3 @@ : T extends Buffer

declare class Minipass<
export class Minipass<
RType extends any = Buffer,

@@ -157,4 +161,1 @@ WType extends any = RType extends Minipass.BufferOrString

}
export default Minipass;
export = Minipass;

@@ -702,3 +702,2 @@ 'use strict'

Minipass.default = Minipass
module.exports = Minipass
exports.Minipass = Minipass
{
"name": "minipass",
"version": "4.2.7",
"version": "5.0.0",
"description": "minimal implementation of a PassThrough stream",

@@ -11,3 +11,3 @@ "main": "./index.js",

"import": {
"types": "./index.d.mts",
"types": "./index.d.ts",
"default": "./index.mjs"

@@ -56,3 +56,2 @@ },

"files": [
"index.d.mts",
"index.d.ts",

@@ -59,0 +58,0 @@ "index.js",

@@ -95,5 +95,5 @@ # minipass

// hybrid module, either works
import Minipass from 'minipass'
import { Minipass } from 'minipass'
// or:
const Minipass = require('minipass')
const { Minipass } = require('minipass')

@@ -120,5 +120,5 @@ const stream = new Minipass()

// hybrid module, either works
import Minipass from 'minipass'
import { Minipass } from 'minipass'
// or:
const Minipass = require('minipass')
const { Minipass } = require('minipass')

@@ -140,3 +140,3 @@ const asyncStream = new Minipass({ async: true })

```js
import Minipass from 'minipass'
import { Minipass } from 'minipass'
const stream = new Minipass({ encoding: 'utf8' })

@@ -162,3 +162,3 @@ stream.on('data', chunk => console.log(chunk))

```js
const Minipass = require('minipass')
const { Minipass } = require('minipass')
const stream = new Minipass({ encoding: 'utf8' })

@@ -391,3 +391,3 @@ stream.on('data', chunk => console.log(chunk))

```js
import Minipass from 'minipass'
import { Minipass } from 'minipass'
const mp = new Minipass(options) // optional: { encoding, objectMode }

@@ -394,0 +394,0 @@ mp.write('foo')

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