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

tree-stream

Package Overview
Dependencies
Maintainers
1
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.6 to 1.0.7

2

index.d.ts
import { Duplex, Readable, Writable } from 'stream'
export type Callback = (error?: Error) => void
export type WritableStreamTreeFilter = (writable: WritableStreamTree) => Promise<boolean>

@@ -21,4 +22,5 @@ export interface ReadableStreamTree {

const writable: (stream: Writable) => WritableStreamTree
const writer: (writeCallback: (w: Writable) => Promise<void>) => WritableStreamTreeFilter
}
export = StreamTree

@@ -233,5 +233,19 @@ var once = require('once')

var streamTreeWriter = function(writeCallback) {
return async (writable) => {
const error = await new Promise(async (resolve, reject) => {
const stream = writable.finish((err) => {
if (err) reject(err)
else resolve()
})
await writeCallback(stream)
})
return !error
}
}
module.exports = {
readable: readableStreamTree,
writable: writableStreamTree,
writer: streamTreeWriter,
}

2

package.json
{
"name": "tree-stream",
"version": "1.0.6",
"version": "1.0.7",
"repository": "git://github.com/wholenews/tree-stream",

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

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