Home / Function/ renameAllIdentifiers() — react Function Reference

renameAllIdentifiers() — react Function Reference

Architecture documentation for the renameAllIdentifiers() function in minimize.ts from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  b99ea007_79df_8b89_65e1_348b6793732f["renameAllIdentifiers()"]
  9c061da8_dbf8_4168_823d_991654a3c55d["minimize.ts"]
  b99ea007_79df_8b89_65e1_348b6793732f -->|defined in| 9c061da8_dbf8_4168_823d_991654a3c55d
  40a2a25e_4c9e_0ebc_44a0_4b399465da22["simplifyIdentifiersRemoveOnPrefix()"]
  40a2a25e_4c9e_0ebc_44a0_4b399465da22 -->|calls| b99ea007_79df_8b89_65e1_348b6793732f
  7aa71470_4175_bdff_c893_620816842e47["simplifyIdentifiersRemoveRefSuffix()"]
  7aa71470_4175_bdff_c893_620816842e47 -->|calls| b99ea007_79df_8b89_65e1_348b6793732f
  d376631b_9d83_dc76_f2ee_4c9d62137454["simplifyIdentifiersRenameRef()"]
  d376631b_9d83_dc76_f2ee_4c9d62137454 -->|calls| b99ea007_79df_8b89_65e1_348b6793732f
  style b99ea007_79df_8b89_65e1_348b6793732f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/snap/src/minimize.ts lines 1887–1900

function renameAllIdentifiers(
  ast: t.File,
  oldName: string,
  newName: string,
): boolean {
  let modified = false;
  t.traverseFast(ast, node => {
    if (t.isIdentifier(node) && node.name === oldName) {
      node.name = newName;
      modified = true;
    }
  });
  return modified;
}

Domain

Subdomains

Frequently Asked Questions

What does renameAllIdentifiers() do?
renameAllIdentifiers() is a function in the react codebase, defined in compiler/packages/snap/src/minimize.ts.
Where is renameAllIdentifiers() defined?
renameAllIdentifiers() is defined in compiler/packages/snap/src/minimize.ts at line 1887.
What calls renameAllIdentifiers()?
renameAllIdentifiers() is called by 3 function(s): simplifyIdentifiersRemoveOnPrefix, simplifyIdentifiersRemoveRefSuffix, simplifyIdentifiersRenameRef.

Analyze Your Own Codebase

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

Try Supermodel Free