You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
452 B
16 lines
452 B
"use strict"; |
|
Object.defineProperty(exports, "__esModule", { value: true }); |
|
exports.toArray = void 0; |
|
/** |
|
* Reads an entire iterable and converts it into a promise. |
|
* @param asyncIterable the async iterable to wait for. |
|
*/ |
|
async function toArray(asyncIterable) { |
|
const data = []; |
|
for await (const item of asyncIterable) { |
|
data.push(item); |
|
} |
|
return data; |
|
} |
|
exports.toArray = toArray; |
|
//# sourceMappingURL=asyncIterable.js.map
|