0.1.4 • Published 3 years ago

@ev-fns/pipe v0.1.4

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

@ev-fns/pipe

Async stream pipeline

  • pipe (source, ...[...transforms, destination]) => Promise<void>

Install

yarn add @ev-fns/pipe

Usage

const fs = require('fs');
const zlib = require('zlib');
const { pipe } = require("@ev-fns/pipe");

pipe(
  fs.createReadStream("archive.tar"),
  zlib.createGzip(),
  fs.createWriteStream("archive.tar.gz")
).then(() => {
  console.log("finished");
});