Home / Function/ normalizeIndent() — react Function Reference

normalizeIndent() — react Function Reference

Architecture documentation for the normalizeIndent() function in shared-utils.ts from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  f9d93ee9_a1c8_932c_1dae_abe7839e287e["normalizeIndent()"]
  799656f0_feaf_2c82_77fc_4a08283ea146["shared-utils.ts"]
  f9d93ee9_a1c8_932c_1dae_abe7839e287e -->|defined in| 799656f0_feaf_2c82_77fc_4a08283ea146
  style f9d93ee9_a1c8_932c_1dae_abe7839e287e fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/eslint-plugin-react-compiler/__tests__/shared-utils.ts lines 11–15

export function normalizeIndent(strings: TemplateStringsArray): string {
  const codeLines = strings[0].split('\n');
  const leftPadding = codeLines[1].match(/\s+/)![0];
  return codeLines.map(line => line.slice(leftPadding.length)).join('\n');
}

Domain

Subdomains

Frequently Asked Questions

What does normalizeIndent() do?
normalizeIndent() is a function in the react codebase, defined in compiler/packages/eslint-plugin-react-compiler/__tests__/shared-utils.ts.
Where is normalizeIndent() defined?
normalizeIndent() is defined in compiler/packages/eslint-plugin-react-compiler/__tests__/shared-utils.ts at line 11.

Analyze Your Own Codebase

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

Try Supermodel Free