UNPKG

aws-client

Version:

Minimalist Node.js client for AWS services

11 lines (9 loc) 279 B
function stream(stream) { return new Promise((resolve, reject) => { const chunks = [] stream.on('data', chunk => chunks.push(chunk)) stream.once('end', () => resolve(Buffer.concat(chunks))) stream.once('error', reject) }) } module.exports = stream