lhl 6ff0e96ad3 8-4-1 | 1 rok pred | |
---|---|---|
.. | ||
History.md | 1 rok pred | |
LICENSE | 1 rok pred | |
README.md | 1 rok pred | |
index.js | 1 rok pred | |
package.json | 1 rok pred |
Pipe ReadStream to a wormhole.
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));