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

Function changeToAsyncValues

lib/internal/streams/from.js:136–156  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

134 }
135
136 async function changeToAsyncValues(value) {
137 isAsyncValues = true;
138
139 try {
140 const res = await value;
141
142 if (res === null) {
143 reading = false;
144 throw new ERR_STREAM_NULL_VALUES();
145 }
146
147 if (readable.push(res)) {
148 nextSyncWithAsyncValues();
149 return;
150 }
151
152 reading = false;
153 } catch (err) {
154 readable.destroy(err);
155 }
156 }
157
158 async function nextSyncWithAsyncValues() {
159 for (;;) {

Callers 1

nextSyncWithSyncValuesFunction · 0.85

Calls 3

nextSyncWithAsyncValuesFunction · 0.85
pushMethod · 0.45
destroyMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…