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

Function GetConstructors

lib/internal/error_serdes.js:82–98  ·  view source on GitHub ↗
(object)

Source from the content-addressed store, hash-verified

80}
81
82function GetConstructors(object) {
83 const constructors = [];
84
85 for (let current = object;
86 current !== null;
87 current = ObjectGetPrototypeOf(current)) {
88 const desc = ObjectGetOwnPropertyDescriptor(current, 'constructor');
89 if (desc?.value) {
90 ObjectDefineProperty(constructors, constructors.length, {
91 __proto__: null,
92 value: desc.value, enumerable: true,
93 });
94 }
95 }
96
97 return constructors;
98}
99
100function GetName(object) {
101 const desc = ObjectGetOwnPropertyDescriptor(object, 'name');

Callers 1

serializeErrorFunction · 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…