lhl 6ff0e96ad3 8-4-1 | vor 1 Jahr | |
---|---|---|
.. | ||
History.md | vor 1 Jahr | |
LICENSE | vor 1 Jahr | |
README.md | vor 1 Jahr | |
index.js | vor 1 Jahr | |
package.json | vor 1 Jahr |
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));