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

Function nextAsync

lib/internal/streams/from.js:190–215  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

188 }
189
190 async function nextAsync() {
191 for (;;) {
192 try {
193 const { value, done } = await iterator.next();
194
195 if (done) {
196 readable.push(null);
197 return;
198 }
199
200 if (value === null) {
201 reading = false;
202 throw new ERR_STREAM_NULL_VALUES();
203 }
204
205 if (readable.push(value)) {
206 continue;
207 }
208
209 reading = false;
210 } catch (err) {
211 readable.destroy(err);
212 }
213 break;
214 }
215 }
216 return readable;
217}
218

Callers 1

fromFunction · 0.85

Calls 3

nextMethod · 0.65
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…