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

Function getConstructorOf

lib/internal/util.js:392–405  ·  view source on GitHub ↗
(obj)

Source from the content-addressed store, hash-verified

390}
391
392function getConstructorOf(obj) {
393 while (obj) {
394 const descriptor = ObjectGetOwnPropertyDescriptor(obj, 'constructor');
395 if (descriptor !== undefined &&
396 typeof descriptor.value === 'function' &&
397 descriptor.value.name !== '') {
398 return descriptor.value;
399 }
400
401 obj = ObjectGetPrototypeOf(obj);
402 }
403
404 return null;
405}
406
407let cachedURL;
408let cachedCWD;

Callers 4

[inspect.custom]Method · 0.85
[inspect]Method · 0.85
[inspect]Function · 0.85
[customInspectSymbol]Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…