Home / Function/ normalizeCodeLocInfo() — react Function Reference

normalizeCodeLocInfo() — react Function Reference

Architecture documentation for the normalizeCodeLocInfo() function in setupTests.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  d53bf53d_68b8_e008_bd7b_2c95c71cafd5["normalizeCodeLocInfo()"]
  4bb57a78_6434_ff0e_5a01_a28eed969531["setupTests.js"]
  d53bf53d_68b8_e008_bd7b_2c95c71cafd5 -->|defined in| 4bb57a78_6434_ff0e_5a01_a28eed969531
  2ee06bbb_2a80_cd1f_54d6_471ebbcb13a4["createMatcherFor()"]
  2ee06bbb_2a80_cd1f_54d6_471ebbcb13a4 -->|calls| d53bf53d_68b8_e008_bd7b_2c95c71cafd5
  style d53bf53d_68b8_e008_bd7b_2c95c71cafd5 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

fixtures/legacy-jsx-runtimes/setupTests.js lines 41–55

function normalizeCodeLocInfo(str) {
  if (typeof str !== 'string') {
    return str;
  }
  // This special case exists only for the special source location in
  // ReactElementValidator. That will go away if we remove source locations.
  str = str.replace(/Check your code at .+?:\d+/g, 'Check your code at **');
  // V8 format:
  //  at Component (/path/filename.js:123:45)
  // React format:
  //    in Component (at filename.js:123)
  return str.replace(/\n +(?:at|in) ([\S]+)[^\n]*/g, function (m, name) {
    return '\n    in ' + name + ' (at **)';
  });
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does normalizeCodeLocInfo() do?
normalizeCodeLocInfo() is a function in the react codebase, defined in fixtures/legacy-jsx-runtimes/setupTests.js.
Where is normalizeCodeLocInfo() defined?
normalizeCodeLocInfo() is defined in fixtures/legacy-jsx-runtimes/setupTests.js at line 41.
What calls normalizeCodeLocInfo()?
normalizeCodeLocInfo() is called by 1 function(s): createMatcherFor.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free