* Collect all bytes from an async or sync source. * @param {AsyncIterable |Iterable } source * @param {{ signal?: AbortSignal, limit?: number }} [options] * @returns {Promise }
(source, options = kNullPrototype)
| 280 | * @returns {Promise<Uint8Array>} |
| 281 | */ |
| 282 | async function bytes(source, options = kNullPrototype) { |
| 283 | validateConsumerOptions(options); |
| 284 | const chunks = await collectAsync(source, options.signal, options.limit); |
| 285 | return concatBytes(chunks); |
| 286 | } |
| 287 | |
| 288 | /** |
| 289 | * Collect and decode text from an async or sync source. |
nothing calls this directly
no test coverage detected
searching dependent graphs…