MCPcopy
hub / github.com/louislam/dockge / on

Method on

common/agent-socket.ts:5–7  ·  view source on GitHub ↗
(event : string, callback : (...args : unknown[]) => void)

Source from the content-addressed store, hash-verified

3 eventList : Map<string, (...args : unknown[]) => void> = new Map();
4
5 on(event : string, callback : (...args : unknown[]) => void) {
6 this.eventList.set(event, callback);
7 }
8
9 call(eventName : string, ...args : unknown[]) {
10 const callback = this.eventList.get(eventName);

Callers 10

initSocketIOFunction · 0.95
testMethod · 0.80
connectMethod · 0.80
constructorMethod · 0.80
createMethod · 0.80
create2Method · 0.80
createMethod · 0.80
createMethod · 0.80
createMethod · 0.80

Calls 1

setMethod · 0.80

Tested by 1

testMethod · 0.64