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

Function slowSource

test/parallel/test-stream-iter-pull-async.js:143–147  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

141 const ac = new AbortController();
142 const enc = new TextEncoder();
143 async function* slowSource() {
144 yield [enc.encode('a')];
145 yield [enc.encode('b')];
146 yield [enc.encode('c')];
147 }
148 const result = pull(slowSource(), { signal: ac.signal });
149 const iter = result[Symbol.asyncIterator]();
150 const first = await iter.next(); // Read first batch

Callers 1

Calls 1

encodeMethod · 0.80

Tested by

no test coverage detected