Home / Function/ normalizeIndent() — react Function Reference

normalizeIndent() — react Function Reference

Architecture documentation for the normalizeIndent() function in eslint-plugin-react-hooks-test-cases.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  e5d8cef5_b3e6_3d7b_7e7a_d9754dd240f6["normalizeIndent()"]
  f684b2e8_51f6_9912_84ac_4895f246b490["eslint-plugin-react-hooks-test-cases.js"]
  e5d8cef5_b3e6_3d7b_7e7a_d9754dd240f6 -->|defined in| f684b2e8_51f6_9912_84ac_4895f246b490
  style e5d8cef5_b3e6_3d7b_7e7a_d9754dd240f6 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/scripts/eslint-plugin-react-hooks-test-cases.js lines 15–19

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

Subdomains

Frequently Asked Questions

What does normalizeIndent() do?
normalizeIndent() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/scripts/eslint-plugin-react-hooks-test-cases.js.
Where is normalizeIndent() defined?
normalizeIndent() is defined in compiler/packages/babel-plugin-react-compiler/scripts/eslint-plugin-react-hooks-test-cases.js at line 15.

Analyze Your Own Codebase

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

Try Supermodel Free