MCPcopy
hub / github.com/braziljs/eloquente-javascript / renderArray

Function renderArray

src/render_html.mjs:186–194  ·  view source on GitHub ↗
(tokens)

Source from the content-addressed store, hash-verified

184}
185
186function renderArray(tokens) {
187 let result = ""
188 for (let i = 0; i < tokens.length; i++) {
189 let token = tokens[i], f = renderer[token.type]
190 if (!f) throw new Error("No render function for " + token.type)
191 result += f(token)
192 }
193 return result
194}
195
196function pad(n) {
197 return (n < 10 ? "0" : "") + n

Callers 2

inlineFunction · 0.70
render_html.mjsFile · 0.70

Calls 1

fFunction · 0.85

Tested by

no test coverage detected