Home / Function/ limitFlattenIdLength() — vite Function Reference

limitFlattenIdLength() — vite Function Reference

Architecture documentation for the limitFlattenIdLength() function in utils.ts from the vite codebase.

Entity Profile

Dependency Diagram

graph TD
  8651c22c_119e_27a2_2928_6ad881579c2d["limitFlattenIdLength()"]
  031bc221_67a8_c579_f2bf_bb30a08beeb2["utils.ts"]
  8651c22c_119e_27a2_2928_6ad881579c2d -->|defined in| 031bc221_67a8_c579_f2bf_bb30a08beeb2
  1cc52ea9_1097_389c_806c_c1207629afcc["flattenId()"]
  1cc52ea9_1097_389c_806c_c1207629afcc -->|calls| 8651c22c_119e_27a2_2928_6ad881579c2d
  9d025481_71dc_8fbb_c07e_b6e74a08a45a["getHash()"]
  8651c22c_119e_27a2_2928_6ad881579c2d -->|calls| 9d025481_71dc_8fbb_c07e_b6e74a08a45a
  style 8651c22c_119e_27a2_2928_6ad881579c2d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/vite/src/node/utils.ts lines 87–95

const limitFlattenIdLength = (
  id: string,
  limit: number = FLATTEN_ID_MAX_FILE_LENGTH,
): string => {
  if (id.length <= limit) {
    return id
  }
  return id.slice(0, limit - (FLATTEN_ID_HASH_LENGTH + 1)) + '_' + getHash(id)
}

Domain

Subdomains

Calls

Called By

Frequently Asked Questions

What does limitFlattenIdLength() do?
limitFlattenIdLength() is a function in the vite codebase, defined in packages/vite/src/node/utils.ts.
Where is limitFlattenIdLength() defined?
limitFlattenIdLength() is defined in packages/vite/src/node/utils.ts at line 87.
What does limitFlattenIdLength() call?
limitFlattenIdLength() calls 1 function(s): getHash.
What calls limitFlattenIdLength()?
limitFlattenIdLength() is called by 1 function(s): flattenId.

Analyze Your Own Codebase

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

Try Supermodel Free