MCPcopy Create free account
hub / github.com/nodejs/node / [customInspectSymbol]

Method [customInspectSymbol]

lib/internal/event_target.js:151–168  ·  view source on GitHub ↗
(depth, options)

Source from the content-addressed store, hash-verified

149 }
150
151 [customInspectSymbol](depth, options) {
152 if (!isEvent(this))
153 throw new ERR_INVALID_THIS('Event');
154 const name = this.constructor.name;
155 if (depth < 0)
156 return name;
157
158 const opts = ObjectAssign({}, options, {
159 depth: NumberIsInteger(options.depth) ? options.depth - 1 : options.depth,
160 });
161
162 return `${name} ${inspect({
163 type: this[kType],
164 defaultPrevented: this.#defaultPrevented,
165 cancelable: this.#cancelable,
166 timeStamp: this.#timestamp,
167 }, opts)}`;
168 }
169
170 stopImmediatePropagation() {
171 if (!isEvent(this))

Callers

nothing calls this directly

Calls 3

isEventFunction · 0.85
ObjectAssignFunction · 0.85
inspectFunction · 0.70

Tested by

no test coverage detected