MCPcopy Index your code
hub / github.com/di-sukharev/opencommit / CreateAsyncFromSyncIterator

Function CreateAsyncFromSyncIterator

out/cli.cjs:11063–11072  ·  view source on GitHub ↗
(syncIteratorRecord)

Source from the content-addressed store, hash-verified

11061 return func;
11062 }
11063 function CreateAsyncFromSyncIterator(syncIteratorRecord) {
11064 const syncIterable = {
11065 [Symbol.iterator]: () => syncIteratorRecord.iterator
11066 };
11067 const asyncIterator2 = async function* () {
11068 return yield* syncIterable;
11069 }();
11070 const nextMethod = asyncIterator2.next;
11071 return { iterator: asyncIterator2, nextMethod, done: false };
11072 }
11073 const SymbolAsyncIterator = (_c2 = (_a5 = Symbol.asyncIterator) !== null && _a5 !== void 0 ? _a5 : (_b2 = Symbol.for) === null || _b2 === void 0 ? void 0 : _b2.call(Symbol, "Symbol.asyncIterator")) !== null && _c2 !== void 0 ? _c2 : "@@asyncIterator";
11074 function GetIterator(obj, hint = "sync", method) {
11075 if (method === void 0) {

Callers 1

GetIteratorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…