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

Method nextSteps

lib/internal/webstreams/readablestream.js:511–525  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

509 // unnecessary Promise allocations to occur, which just add
510 // cost.
511 function nextSteps() {
512 if (state.done)
513 return PromiseResolve({ done: true, value: undefined });
514
515 if (reader[kState].stream === undefined) {
516 return PromiseReject(
517 new ERR_INVALID_STATE.TypeError(
518 'The reader is not bound to a ReadableStream'));
519 }
520 const promise = PromiseWithResolvers();
521
522 // eslint-disable-next-line no-use-before-define
523 readableStreamDefaultReaderRead(reader, new ReadableStreamAsyncIteratorReadRequest(reader, state, promise));
524 return promise.promise;
525 }
526
527 async function returnSteps(value) {
528 if (state.done)

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected