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

tree-stream

Package Overview
Dependencies
Maintainers
2
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tree-stream - npm Package Compare versions

Comparing version 1.0.15 to 1.1.0

.github/workflows/test.yaml

6

index.d.ts

@@ -24,3 +24,3 @@ import { Duplex, Readable, Writable } from 'stream'

node: TreeNode
finish(callback?: Callback, pipe?: Readable): Writable
finish(callback?: Callback, pipe?: ReadableStreamTree): Writable
joinReadable(siblings: number): [WritableStreamTree, ReadableStreamTree[]]

@@ -37,7 +37,7 @@ joinWritable(siblings: Writable[], callback?: Callback[]): WritableStreamTree

const pumpReadable: <X extends unknown>(stream: ReadableStreamTree, resolveValue: X) => Promise<X>
const pumpWritable: <X extends unknown>(stream: WritableStreamTree, resolveValue: X, readable?: Readable) => Promise<X>
const pumpWritable: <X extends unknown>(stream: WritableStreamTree, resolveValue: X, readable?: ReadableStreamTree) => Promise<X>
const finishReadable: <X extends unknown>(stream: ReadableStreamTree, resolve: (x: X) => void, reject: (err: Error) => void, resolveValue?: X) => Readable
const finishWritable: <X extends unknown>(stream: WritableStreamTree, resolve: (x: X) => void, reject: (err: Error) => void, resolveValue?: X, readable?: Readable) => Writable
const finishWritable: <X extends unknown>(stream: WritableStreamTree, resolve: (x: X) => void, reject: (err: Error) => void, resolveValue?: X, readable?: ReadableStreamTree) => Writable
}
export = StreamTree

@@ -218,8 +218,6 @@ var once = require('once')

// Finalize tree structure and return stream.Writable.
var finish = function(finalNode, callback, stream) {
var finish = function(finalNode, callback, readNode) {
if (callback) terminalNode.callback = callback
var readNode
if (stream) {
readNode = createNode(stream)
if (readNode) {
readNode.childNode.push(finalNode)

@@ -232,3 +230,3 @@ finalNode.parentNode = readNode

addDestroyer(readNode, true, false)
stream.pipe(finalNode.stream)
readNode.stream.pipe(finalNode.stream)
}

@@ -243,3 +241,3 @@

handle.node = node
handle.finish = function(callback, stream) { return finish(node, callback, stream) }
handle.finish = function(callback, readHandle) { return finish(node, callback, readHandle ? readHandle.node : undefined) }
handle.joinReadable = function(siblings, newPassThrough) { return joinReadable(node, siblings, newPassThrough) }

@@ -246,0 +244,0 @@ handle.joinWritable = function(siblings, callback) { return joinWritable(node, siblings, callback) }

{
"name": "tree-stream",
"version": "1.0.15",
"version": "1.1.0",
"repository": "git://github.com/wholenews/tree-stream",

@@ -5,0 +5,0 @@ "license": "MIT",

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

# tree-stream
# tree-stream ![image](https://img.shields.io/npm/v/tree-stream) [![test](https://github.com/wholebuzz/tree-stream/actions/workflows/test.yaml/badge.svg)](https://github.com/wholebuzz/tree-stream/actions/workflows/test.yaml)

@@ -56,3 +56,3 @@ tree-stream is a small node module that pipes streams together and destroys all of them if one of them closes.

```typescript
const returnValue = await pumpWritable(writable, 'any return value', readable.finish())
const returnValue = await pumpWritable(writable, 'any return value', readable)
```

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