MCPcopy
hub / github.com/facebook/react / normalizeStack

Function normalizeStack

packages/internal-test-utils/debugInfo.js:28–45  ·  view source on GitHub ↗
(stack)

Source from the content-addressed store, hash-verified

26}
27
28function normalizeStack(stack) {
29 if (!stack) {
30 return stack;
31 }
32 const copy = [];
33 for (let i = 0; i < stack.length; i++) {
34 const [name, file, line, col, enclosingLine, enclosingCol] = stack[i];
35 copy.push([
36 name,
37 file.replace(repoRoot, ''),
38 line,
39 col,
40 enclosingLine,
41 enclosingCol,
42 ]);
43 }
44 return copy;
45}
46
47function normalizeIOInfo(config: DebugInfoConfig, ioInfo) {
48 const {debugTask, debugStack, debugLocation, ...copy} = ioInfo;

Callers 2

normalizeIOInfoFunction · 0.85
normalizeDebugInfoFunction · 0.85

Calls 1

pushMethod · 0.65

Tested by

no test coverage detected