hexo/node_modules/stream-wormhole
jkjoy 9a9cb42f53 20231003 update 2023-10-03 11:14:36 +08:00
..
History.md 20231003 update 2023-10-03 11:14:36 +08:00
LICENSE 20231003 update 2023-10-03 11:14:36 +08:00
README.md 20231003 update 2023-10-03 11:14:36 +08:00
index.js 20231003 update 2023-10-03 11:14:36 +08:00
package.json 20231003 update 2023-10-03 11:14:36 +08:00

README.md

stream-wormhole

NPM version build status Test coverage David deps Known Vulnerabilities npm download

Pipe ReadStream to a wormhole.

Usage

const sendToWormhole = require('stream-wormhole');
const fs = require('fs');

const readStream = fs.createReadStream(__filename);

// ignore all error by default
sendToWormhole(readStream, true)
  .then(() => console.log('done'));

// throw error
sendToWormhole(readStream, true)
  .then(() => console.log('done'))
  .catch(err => console.error(err));

License

MIT