once() — vue Function Reference
Architecture documentation for the once() function in util.ts from the vue codebase.
Entity Profile
Dependency Diagram
graph TD f1f4b24d_509b_4634_bd6a_d3b0e91f0b48["once()"] b003e13b_30f4_2501_b631_df864fa7941b["enter()"] b003e13b_30f4_2501_b631_df864fa7941b -->|calls| f1f4b24d_509b_4634_bd6a_d3b0e91f0b48 29af0f73_d62b_5291_e707_1f3301bf3357["leave()"] 29af0f73_d62b_5291_e707_1f3301bf3357 -->|calls| f1f4b24d_509b_4634_bd6a_d3b0e91f0b48 style f1f4b24d_509b_4634_bd6a_d3b0e91f0b48 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
src/shared/util.ts lines 361–369
export function once<T extends (...args: any[]) => any>(fn: T): T {
let called = false
return function () {
if (!called) {
called = true
fn.apply(this, arguments as any)
}
} as any
}
Domain
Subdomains
Source
Frequently Asked Questions
What does once() do?
once() is a function in the vue codebase.
What calls once()?
once() is called by 2 function(s): enter, leave.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free