MCPcopy Create free account
hub / github.com/cacjs/cac / parse

Function parse

src/utils.ts:21–33  ·  view source on GitHub ↗
(match: string[])

Source from the content-addressed store, hash-verified

19 const res = []
20
21 const parse = (match: string[]) => {
22 let variadic = false
23 let value = match[1]
24 if (value.startsWith('...')) {
25 value = value.slice(3)
26 variadic = true
27 }
28 return {
29 required: match[0].startsWith('<'),
30 value,
31 variadic,
32 }
33 }
34
35 let angledMatch
36 while ((angledMatch = ANGLED_BRACKET_RE_GLOBAL.exec(v))) {

Callers 1

findAllBracketsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected