@ev-fns/pipe
v0.1.4
Published
Async stream pipeline
Downloads
16
Readme
@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");
});