Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
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

  • 1.2.6
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
8.1K
decreased by-69.07%
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 --save

API

pipe

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

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

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

getBody

Get body of readStream

const pipe = require('pipe-io');
const fs = require('fs');
const NAME = 'README.md';
const readStream = fs.createReadStream(NAME);

pipe.getBody(readStream, (error, data) => {
    console.log(error || data);
});
  • Pullout - pull out data from stream

License

MIT

Keywords

FAQs

Package last updated on 08 Nov 2016

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

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