Home / Function/ repeat() — vue Function Reference

repeat() — vue Function Reference

Architecture documentation for the repeat() function in codeframe.ts from the vue codebase.

Entity Profile

Dependency Diagram

graph TD
  6212b3cc_9023_ea82_5ae6_bad4340a5b91["repeat()"]
  eb367a79_758d_d887_b761_550177f27249["generateCodeFrame()"]
  eb367a79_758d_d887_b761_550177f27249 -->|calls| 6212b3cc_9023_ea82_5ae6_bad4340a5b91
  style 6212b3cc_9023_ea82_5ae6_bad4340a5b91 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/compiler/codeframe.ts lines 39–52

function repeat(str: string, n: number) {
  let result = ''
  if (n > 0) {
    // eslint-disable-next-line no-constant-condition
    while (true) {
      // eslint-disable-line
      if (n & 1) result += str
      n >>>= 1
      if (n <= 0) break
      str += str
    }
  }
  return result
}

Domain

Subdomains

Frequently Asked Questions

What does repeat() do?
repeat() is a function in the vue codebase.
What calls repeat()?
repeat() is called by 1 function(s): generateCodeFrame.

Analyze Your Own Codebase

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

Try Supermodel Free