MCPcopy Index your code
hub / github.com/nodejs/node / emit

Method emit

lib/internal/event_target.js:1003–1010  ·  view source on GitHub ↗

* @param {string} type * @param {any} arg * @returns {boolean}

(type, arg)

Source from the content-addressed store, hash-verified

1001 * @returns {boolean}
1002 */
1003 emit(type, arg) {
1004 if (!isNodeEventTarget(this))
1005 throw new ERR_INVALID_THIS('NodeEventTarget');
1006 validateString(type, 'type');
1007 const hadListeners = this.listenerCount(type) > 0;
1008 this[kHybridDispatch](arg, type);
1009 return hadListeners;
1010 }
1011
1012 /**
1013 * @param {string} type

Callers 15

constructorMethod · 0.45
addMethod · 0.45
constructorMethod · 0.45
ondataMethod · 0.45
ChildProcessFunction · 0.45
onSpawnNTFunction · 0.45
child_process.jsFile · 0.45
setupChannelFunction · 0.45
finishFunction · 0.45
emitFunction · 0.45
maybeCloseFunction · 0.45
constructorMethod · 0.45

Calls 2

listenerCountMethod · 0.95
isNodeEventTargetFunction · 0.85

Tested by

no test coverage detected