MCPcopy Create free account
hub / github.com/nodejs/node / trimRemoteObject

Function trimRemoteObject

lib/internal/debugger/inspect_probe.js:165–182  ·  view source on GitHub ↗
(result)

Source from the content-addressed store, hash-verified

163}
164
165function trimRemoteObject(result) {
166 if (result === undefined || result === null || typeof result !== 'object') {
167 return result;
168 }
169
170 if (ArrayIsArray(result)) {
171 return ArrayPrototypeMap(result, trimRemoteObject);
172 }
173
174 const trimmed = { __proto__: null };
175 for (const { 0: key, 1: value } of ObjectEntries(result)) {
176 if (key === 'objectId' || key === 'className') {
177 continue;
178 }
179 trimmed[key] = trimRemoteObject(value);
180 }
181 return trimmed;
182}
183
184function stripProbePreviews(value) {
185 if (value === undefined || value === null || typeof value !== 'object') {

Callers 1

evaluateProbeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected