MCPcopy Create free account
hub / github.com/Writesonic/GPTRouter / push

Function push

src/utils/createEventStream.ts:11–16  ·  view source on GitHub ↗
(value: any)

Source from the content-addressed store, hash-verified

9 let pushValue: any | Promise<any> = new Promise(resolve => (pullControl = resolve));
10
11 const push = (value: any) => {
12 if (pullControl) {
13 pullControl(value);
14 pushValue = new Promise(resolve => (pullControl = resolve));
15 }
16 };
17
18 source.addEventListener("output", e => {
19 push(e);

Callers 1

[Symbol.asyncIterator]Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected