MCPcopy Index your code
hub / github.com/react/react / normalizeCodeLocInfo

Function normalizeCodeLocInfo

packages/react-client/src/__tests__/ReactFlight-test.js:23–34  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

21}
22
23function normalizeCodeLocInfo(str) {
24 return (
25 str &&
26 str.replace(/^ +(?:at|in) ([\S]+)[^\n]*/gm, function (m, name) {
27 const dot = name.lastIndexOf('.');
28 if (dot !== -1) {
29 name = name.slice(dot + 1);
30 }
31 return ' in ' + name + (/\d/.test(m) ? ' (at **)' : '');
32 })
33 );
34}
35
36const repoRoot = path.resolve(__dirname, '../../../../');
37function normalizeReactCodeLocInfo(str) {

Callers 1

componentDidCatchMethod · 0.70

Calls 1

testMethod · 0.45

Tested by

no test coverage detected