MCPcopy Index your code
hub / github.com/nodejs/node / bytes

Function bytes

lib/internal/streams/iter/consumers.js:282–286  ·  view source on GitHub ↗

* Collect all bytes from an async or sync source. * @param {AsyncIterable |Iterable } source * @param {{ signal?: AbortSignal, limit?: number }} [options] * @returns {Promise }

(source, options = kNullPrototype)

Source from the content-addressed store, hash-verified

280 * @returns {Promise<Uint8Array>}
281 */
282async 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.

Callers

nothing calls this directly

Calls 3

validateConsumerOptionsFunction · 0.85
collectAsyncFunction · 0.85
concatBytesFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…