UNPKG

node-red-contrib-tak-registration

Version:

A Node-RED node to register to TAK and to help wrap files as datapackages to send to TAK

16 lines (13 loc) 318 B
const {asyncIterator} = Symbol; const readBlob = async function* (blob) { if (blob.stream) { yield* blob.stream() } else if (blob.arrayBuffer) { yield await blob.arrayBuffer() } else if (blob[asyncIterator]) { yield* blob[asyncIterator](); } else { yield blob; } } export default readBlob;