@akumzy/pipeline
v0.0.1
Published
Promisify Node stream pipeline function
Downloads
3
Readme
stream-pipeline
Promisify NodeJs stream pipeline function
Installation
npm install @akumzy/stream-pipeline
# or
yarn add @akumzy/stream-pipeline
Usage
const pipeline = require('@akumzy/stream-pipeline')
....
// Using async await
await pipeline(readableStream,writableStreamOrDeplux)
....
// Using Promise
pipeline(readableStream,writableStreamOrDeplux)
.then(()=>{
// Done
})
.catch(error=>{
// Oops!
})