https://github.com/node-modules/stream-wormhole
Pipe ReadStream to a wormhole
https://github.com/node-modules/stream-wormhole
nodejs stream
Last synced: 8 months ago
JSON representation
Pipe ReadStream to a wormhole
- Host: GitHub
- URL: https://github.com/node-modules/stream-wormhole
- Owner: node-modules
- License: other
- Created: 2016-07-15T08:51:38.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2023-09-17T05:02:45.000Z (over 2 years ago)
- Last Synced: 2025-07-26T08:50:39.963Z (9 months ago)
- Topics: nodejs, stream
- Language: TypeScript
- Homepage:
- Size: 20.5 KB
- Stars: 42
- Watchers: 14
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# stream-wormhole
[![NPM version][npm-image]][npm-url]
[](https://github.com/node-modules/stream-wormhole/actions/workflows/nodejs.yml)
[![Test coverage][codecov-image]][codecov-url]
[![npm download][download-image]][download-url]
[npm-image]: https://img.shields.io/npm/v/stream-wormhole.svg?style=flat-square
[npm-url]: https://npmjs.org/package/stream-wormhole
[codecov-image]: https://codecov.io/github/node-modules/stream-wormhole/coverage.svg?branch=master
[codecov-url]: https://codecov.io/github/node-modules/stream-wormhole?branch=master
[download-image]: https://img.shields.io/npm/dm/stream-wormhole.svg?style=flat-square
[download-url]: https://npmjs.org/package/stream-wormhole
Pipe `ReadStream` / `Readable` to a wormhole.
## Usage
```ts
import sendToWormhole from 'stream-wormhole';
import fs from 'node:fs';
const readStream = fs.createReadStream(__filename);
// ignore all error by default
sendToWormhole(readStream)
.then(() => console.log('done'));
// throw error
sendToWormhole(readStream, true)
.then(() => console.log('done'))
.catch(err => console.error(err));
```
## License
[MIT](LICENSE)
## Contributors
|[
fengmk2](https://github.com/fengmk2)
|[
denghongcai](https://github.com/denghongcai)
|[
dead-horse](https://github.com/dead-horse)
|
| :---: | :---: | :---: |
This project follows the git-contributor [spec](https://github.com/xudafeng/git-contributor), auto updated at `Sat Sep 16 2023 14:11:38 GMT+0800`.