Home / Function/ specifierEnd() — vue Function Reference

specifierEnd() — vue Function Reference

Architecture documentation for the specifierEnd() function in rewriteDefault.ts from the vue codebase.

Entity Profile

Dependency Diagram

graph TD
  8c89f29c_f2d2_77b1_38ab_4a8401e62be4["specifierEnd()"]
  81fc81a6_5762_0cf2_fa0f_6c5be69a5d84["rewriteDefault()"]
  81fc81a6_5762_0cf2_fa0f_6c5be69a5d84 -->|calls| 8c89f29c_f2d2_77b1_38ab_4a8401e62be4
  style 8c89f29c_f2d2_77b1_38ab_4a8401e62be4 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/compiler-sfc/src/rewriteDefault.ts lines 101–121

function specifierEnd(
  input: string,
  end: number,
  nodeEnd: number | undefined | null
) {
  // export { default   , foo } ...
  let hasCommas = false
  let oldEnd = end
  while (end < nodeEnd!) {
    if (/\s/.test(input.charAt(end))) {
      end++
    } else if (input.charAt(end) === ',') {
      end++
      hasCommas = true
      break
    } else if (input.charAt(end) === '}') {
      break
    }
  }
  return hasCommas ? end : oldEnd
}

Domain

Subdomains

Called By

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free