Download tarball from zig download index

This commit is contained in:
Renée Kooi
2019-10-07 10:13:17 +02:00
parent 44120b6411
commit d17679454f
29 changed files with 1455 additions and 8 deletions
+14
View File
@@ -0,0 +1,14 @@
module.exports = function (stream, cb) {
var chunks = []
stream.on('data', function (chunk) {
chunks.push(chunk)
})
stream.once('end', function () {
if (cb) cb(null, Buffer.concat(chunks))
cb = null
})
stream.once('error', function (err) {
if (cb) cb(err)
cb = null
})
}