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

Method pull

out/cli.cjs:69207–69217  ·  view source on GitHub ↗
(ctrl)

Source from the content-addressed store, hash-verified

69205 toReadableStream() {
69206 const self2 = this;
69207 let iter;
69208 const encoder = new TextEncoder();
69209 return new ReadableStream2({
69210 async start() {
69211 iter = self2[Symbol.asyncIterator]();
69212 },
69213 async pull(ctrl) {
69214 try {
69215 const { value, done } = await iter.next();
69216 if (done)
69217 return ctrl.close();
69218 const bytes = encoder.encode(JSON.stringify(value) + "\n");
69219 ctrl.enqueue(bytes);
69220 } catch (err) {

Callers

nothing calls this directly

Calls 5

encodeMethod · 0.80
nextMethod · 0.45
closeMethod · 0.45
enqueueMethod · 0.45
errorMethod · 0.45

Tested by

no test coverage detected