MCPcopy Create free account
hub / github.com/DavidWells/analytics / formatArguments

Function formatArguments

packages/analytics-cli/src/commands/docs.js:110–125  ·  view source on GitHub ↗
(tags)

Source from the content-addressed store, hash-verified

108}
109
110function formatArguments(tags) {
111 const theArgs = tags.filter((tag) => {
112 return tag.type === 'param'
113 }).map((tag) => {
114 return renderArg(tag)
115 })
116 // console.log('theArgs', theArgs)
117 if (theArgs.length) {
118 return `**Arguments**
119
120${theArgs.join('\n')}
121
122`
123 }
124 return ''
125}
126
127function renderArg(tag) {
128 const optionalText = (tag.name.match(/^\[/)) ? '(optional) ' : ''

Callers 1

APIFunction · 0.70

Calls 1

renderArgFunction · 0.70

Tested by

no test coverage detected