UNPKG

@tak-ps/node-tak

Version:

Lightweight JavaScript library for communicating with TAK Server

9 lines 371 B
export default async function stream2buffer(stream) { return new Promise((resolve, reject) => { const _buf = Array(); stream.on("data", chunk => _buf.push(chunk)); stream.on("end", () => resolve(Buffer.concat(_buf))); stream.on("error", (err) => reject(`error converting stream - ${err}`)); }); } //# sourceMappingURL=stream.js.map