MCPcopy Index your code
hub / github.com/MALSync/MALSync / globalEmit

Function globalEmit

src/utils/emitter.ts:9–23  ·  view source on GitHub ↗
(eventName: string, ...params)

Source from the content-addressed store, hash-verified

7});
8
9export function globalEmit(eventName: string, ...params) {
10 con
11 .m('Global')
12 .m('Emit')
13 .debug(eventName, ...params);
14
15 emitter.emit(`${eventName}`, ...params);
16
17 if (typeof api !== 'undefined' && api && api.type === 'webextension') {
18 chrome.runtime.sendMessage({
19 name: 'emitter',
20 item: { event: eventName, params, id: scriptId },
21 });
22 }
23}
24
25if (typeof api !== 'undefined' && api && api.type === 'webextension') {
26 chrome.runtime.sendMessage({

Callers 2

emitUpdateFunction · 0.90
deleteFunction · 0.90

Calls 2

emitMethod · 0.80
sendMessageMethod · 0.80

Tested by

no test coverage detected