You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

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

Pipe streams and handle events

4.0.1
latest
Source
npmnpm
Version published
Weekly downloads
23K
6.34%
Maintainers
1
Weekly downloads
 
Created
Source

Pipe-io License NPM version Dependency Status Build Status Coverage Status

Pipe streams and handle events.

Install

npm i pipe-io

API

pipe

Create pipe between streams and adds callback wich would be called once whenever everything is done, or error occures.

const fs = require('fs');

const pipe = require('pipe-io');
const tryToCatch = require('try-to-catch');

const NAME = 'README.md';
const NAME2 = 'README2.md';
const readStream = fs.createReadStream(NAME);
const writeStream = fs.createWriteStream(NAME2);

const [e] = await tryToCatch(pipe, [readStream, writeStream]);
  • Pullout - pull out data from stream

License

MIT

Keywords

pipe

FAQs

Package last updated on 14 Apr 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts