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

Function createReadable

lib/internal/streams/iter/push.js:656–676  ·  view source on GitHub ↗
(queue)

Source from the content-addressed store, hash-verified

654// =============================================================================
655
656function createReadable(queue) {
657 return {
658 __proto__: null,
659 [SymbolAsyncIterator]() {
660 return {
661 __proto__: null,
662 async next() {
663 return queue.read();
664 },
665 async return() {
666 queue.consumerReturn();
667 return { __proto__: null, done: true, value: undefined };
668 },
669 async throw(error) {
670 queue.consumerThrow(error);
671 return { __proto__: null, done: true, value: undefined };
672 },
673 };
674 },
675 };
676}
677
678// =============================================================================
679// Stream.push() Factory

Callers 1

pushFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected