Home / Function/ hash() — vue Function Reference

hash() — vue Function Reference

Architecture documentation for the hash() function in index.ts from the vue codebase.

Entity Profile

Dependency Diagram

graph TD
  e740524c_6989_b248_6467_b356659c7057["hash()"]
  6a18399e_553e_fef8_6a39_746f79f94bd2["index.ts"]
  e740524c_6989_b248_6467_b356659c7057 -->|defined in| 6a18399e_553e_fef8_6a39_746f79f94bd2
  e76cb7d0_b3c3_6c47_2e67_6c6f84d32371["genScopedSlots()"]
  e76cb7d0_b3c3_6c47_2e67_6c6f84d32371 -->|calls| e740524c_6989_b248_6467_b356659c7057
  style e740524c_6989_b248_6467_b356659c7057 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/compiler/codegen/index.ts lines 470–477

function hash(str) {
  let hash = 5381
  let i = str.length
  while (i) {
    hash = (hash * 33) ^ str.charCodeAt(--i)
  }
  return hash >>> 0
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does hash() do?
hash() is a function in the vue codebase, defined in src/compiler/codegen/index.ts.
Where is hash() defined?
hash() is defined in src/compiler/codegen/index.ts at line 470.
What calls hash()?
hash() is called by 1 function(s): genScopedSlots.

Analyze Your Own Codebase

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

Try Supermodel Free