MCPcopy
hub / github.com/ValueCell-ai/ClawX / once

Function once

tests/unit/gateway-supervisor.test.ts:64–67  ·  view source on GitHub ↗
(event: string, callback: (...args: unknown[]) => void)

Source from the content-addressed store, hash-verified

62 const handlers = new Map<string, (...args: unknown[]) => void>();
63 return {
64 once(event: string, callback: (...args: unknown[]) => void) {
65 handlers.set(event, callback);
66 return this;
67 },
68 listen() {
69 queueMicrotask(() => handlers.get('listening')?.());
70 return this;

Callers

nothing calls this directly

Calls 1

setMethod · 0.65

Tested by

no test coverage detected