MCPcopy Create free account
hub / github.com/PenguLoader/PenguLoader / buildApi

Function buildApi

plugins/src/preload/rcp/socket.ts:39–43  ·  view source on GitHub ↗
(api: string)

Source from the content-addressed store, hash-verified

37}
38
39function buildApi(api: string): string {
40 if (api === 'all') return 'OnJsonApiEvent';
41 api = api.toLowerCase().replace(/^\/+|\/+$/g, '');
42 return 'OnJsonApiEvent_' + api.replace(/\//g, '_');
43}
44
45function observe(api: string, listener: ApiListener) {
46 if (typeof api !== 'string' || api === ''

Callers 2

observeFunction · 0.85
disconnectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected