MCPcopy Index your code
hub / github.com/Fiddle-Digital/string-scroll / emit

Method emit

src/EventManager.ts:12–18  ·  view source on GitHub ↗
(id: string, value: any)

Source from the content-addressed store, hash-verified

10 return this.events.has(id)
11 }
12 public emit(id: string, value: any) {
13 if (this.events.has(id)) {
14 this.events.get(id)?.forEach((event: any) => {
15 event(value)
16 });
17 }
18 }
19 public off(id: string, event: Function) {
20 let ea = this.events.get(id)
21 if (ea!=null) {

Callers 2

statusMethod · 0.80
callbackShowMethod · 0.80

Calls 2

hasMethod · 0.80
getMethod · 0.80

Tested by

no test coverage detected