Socket
Socket
Sign inDemoInstall

pipe-io

Package Overview
Dependencies
Maintainers
1
Versions
78
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pipe-io - npm Package Compare versions

Comparing version 3.0.12 to 4.0.0

12

lib/pipe.js

@@ -5,5 +5,5 @@ 'use strict';

const zlib = require('zlib');
const assert = require('assert');
const {promisify} = require('util');
module.exports = (streams, options, callback) => {
module.exports = promisify((streams, options, callback) => {
if (!callback) {

@@ -19,7 +19,4 @@ callback = options;

assert(streams, 'streams could not be empty!');
assert(callback, 'callback could not be empty!');
pipe(streams, options, callback);
};
});

@@ -129,5 +126,2 @@ function pipe(allStreams, options, callback) {

if (readError && writeOpened)
return onEnd();
if (readError && !isFsWriteStream)

@@ -134,0 +128,0 @@ return onEnd();

{
"name": "pipe-io",
"version": "3.0.12",
"version": "4.0.0",
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",

@@ -28,3 +28,3 @@ "description": "Pipe streams and handle events",

"engines": {
"node": ">=4"
"node": ">=8"
},

@@ -47,2 +47,3 @@ "main": "lib/pipe.js",

"tar-fs": "^2.0.0",
"tar-stream": "^2.1.0",
"through2": "^3.0.0",

@@ -49,0 +50,0 @@ "try-to-catch": "^1.0.2"

@@ -18,4 +18,7 @@ Pipe-io [![License][LicenseIMGURL]][LicenseURL] [![NPM version][NPMIMGURL]][NPMURL] [![Dependency Status][DependencyStatusIMGURL]][DependencyStatusURL] [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Coverage Status][CoverageIMGURL]][CoverageURL]

```js
const fs = require('fs');
const pipe = require('pipe-io');
const fs = require('fs');
const tryToCatch = require('try-to-catch');
const NAME = 'README.md';

@@ -26,5 +29,3 @@ const NAME2 = 'README2.md';

pipe([readStream, writeStream], (error) => {
console.log(error || 'done');
});
const [e] = await tryToCatch(pipe, [readStream, writeStream]);
```

@@ -31,0 +32,0 @@

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