UNPKG

351 BJavaScriptView Raw
1'use strict';
2
3let cli = require('heroku-cli-util');
4
5let Stream = function (url) {
6 return new Promise(function (resolve, reject) {
7 let stream = cli.got.stream(url);
8 stream.on('error', reject);
9 stream.on('end', resolve);
10 let piped = stream.pipe(process.stdout);
11 piped.on('error', reject);
12 });
13};
14
15module.exports = {
16 Stream
17};
\No newline at end of file