MCPcopy Index your code
hub / github.com/chartbrew/chartbrew / on

Method on

client/src/modules/socketClient.js:163–171  ·  view source on GitHub ↗

* Add event listener * @param {string} event - Event name * @param {Function} handler - Event handler

(event, handler)

Source from the content-addressed store, hash-verified

161 * @param {Function} handler - Event handler
162 */
163 on(event, handler) {
164 if (!this.socket) {
165 console.warn("Cannot add listener: socket not initialized");
166 return;
167 }
168
169 this.socket.on(event, handler);
170 this.listeners.set(event + handler.toString(), handler);
171 }
172
173 /**
174 * Remove event listener

Callers 10

connectMethod · 0.80
AiModalFunction · 0.80
setUpQueuesFunction · 0.80
attachClientFunction · 0.80
setupRedisAdapterMethod · 0.80
createSshTunnelFunction · 0.80
persistNewRefreshTokenFunction · 0.80
getDataMethod · 0.80
parseUploadFunction · 0.80

Calls 1

setMethod · 0.45

Tested by

no test coverage detected