Home / Function/ alphaSortEntries() — react Function Reference

alphaSortEntries() — react Function Reference

Architecture documentation for the alphaSortEntries() function in utils.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  703db4ef_ef9f_8a4b_eecf_6dad80aa9ddd["alphaSortEntries()"]
  d7b27d30_728f_ba37_ed97_d371fbd3de62["utils.js"]
  703db4ef_ef9f_8a4b_eecf_6dad80aa9ddd -->|defined in| d7b27d30_728f_ba37_ed97_d371fbd3de62
  style 703db4ef_ef9f_8a4b_eecf_6dad80aa9ddd fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-devtools-shared/src/devtools/views/utils.js lines 20–33

export function alphaSortEntries(
  entryA: [string, mixed],
  entryB: [string, mixed],
): number {
  const a = entryA[0];
  const b = entryB[0];
  if (String(+a) === a) {
    if (String(+b) !== b) {
      return -1;
    }
    return +a < +b ? -1 : 1;
  }
  return a < b ? -1 : 1;
}

Domain

Subdomains

Frequently Asked Questions

What does alphaSortEntries() do?
alphaSortEntries() is a function in the react codebase, defined in packages/react-devtools-shared/src/devtools/views/utils.js.
Where is alphaSortEntries() defined?
alphaSortEntries() is defined in packages/react-devtools-shared/src/devtools/views/utils.js at line 20.

Analyze Your Own Codebase

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

Try Supermodel Free