MCPcopy
hub / github.com/di-sukharev/opencommit / toAsyncIterable

Function toAsyncIterable

out/cli.cjs:77997–78014  ·  view source on GitHub ↗
(stream4)

Source from the content-addressed store, hash-verified

77995 },
77996 iterable: stream4
77997 };
77998 }
77999}
78000function isReadableStream4(body) {
78001 return Boolean(body && typeof body.getReader === "function" && typeof body.tee === "function");
78002}
78003function toAsyncIterable(stream4) {
78004 return __asyncGenerator(this, arguments, function* toAsyncIterable_1() {
78005 const reader = stream4.getReader();
78006 try {
78007 while (true) {
78008 const { value, done } = yield __await(reader.read());
78009 if (done) {
78010 return yield __await(void 0);
78011 }
78012 yield yield __await(value);
78013 }
78014 } finally {
78015 const cancelPromise = reader.cancel();
78016 reader.releaseLock();
78017 yield __await(cancelPromise);

Callers 1

makeAsyncIterable2Function · 0.85

Calls 6

__asyncGeneratorFunction · 0.85
__awaitFunction · 0.85
getReaderMethod · 0.45
readMethod · 0.45
cancelMethod · 0.45
releaseLockMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…