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

Method [customInspectSymbol]

lib/internal/debugger/inspect_repl.js:544–561  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

542
543 class Backtrace extends Array {
544 [customInspectSymbol]() {
545 return ArrayPrototypeJoin(
546 ArrayPrototypeMap(this, (callFrame, idx) => {
547 const {
548 location: { scriptId, lineNumber, columnNumber },
549 functionName,
550 } = callFrame;
551 const name = functionName || '(anonymous)';
552
553 const script = knownScripts[scriptId];
554 const relativeUrl =
555 (script && getRelativePath(script.url)) || '<unknown>';
556 const frameLocation =
557 `${relativeUrl}:${lineNumber + 1}:${columnNumber}`;
558
559 return `#${idx} ${name} ${frameLocation}`;
560 }), '\n');
561 }
562
563 static from(callFrames) {
564 return FunctionPrototypeCall(

Callers

nothing calls this directly

Calls 1

getRelativePathFunction · 0.70

Tested by

no test coverage detected