once() — vue Function Reference
Architecture documentation for the once() function in util.ts from the vue codebase.
Entity Profile
Dependency Diagram
graph TD a8e0e452_e7c0_9fb5_f4fe_58e890a49204["once()"] ba54cdc9_f934_43fb_f1d2_3319595d4c1d["enter()"] ba54cdc9_f934_43fb_f1d2_3319595d4c1d -->|calls| a8e0e452_e7c0_9fb5_f4fe_58e890a49204 bb5c970d_2e75_b59b_6ddf_fe4f60d2e887["leave()"] bb5c970d_2e75_b59b_6ddf_fe4f60d2e887 -->|calls| a8e0e452_e7c0_9fb5_f4fe_58e890a49204 style a8e0e452_e7c0_9fb5_f4fe_58e890a49204 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