MCPcopy Create free account
hub / github.com/MCSManager/MCSManager / on

Function on

frontend/src/hooks/useCategoryEvents.ts:6–8  ·  view source on GitHub ↗
(id: string, event: string, callback: (...args: any[]) => void)

Source from the content-addressed store, hash-verified

4export const useCategoryEvents = createGlobalState(() => {
5 const events = new EventEmitter();
6 const on = (id: string, event: string, callback: (...args: any[]) => void) => {
7 events.on(id + event, callback);
8 };
9 const emit = (id: string, event: string, ...args: any[]) => {
10 events.emit(id + event, ...args);
11 };

Callers

nothing calls this directly

Calls 1

onMethod · 0.80

Tested by

no test coverage detected