MCPcopy Index your code
hub / github.com/braziljs/eloquente-javascript / childrenText

Function childrenText

src/transform.mjs:1–8  ·  view source on GitHub ↗
(token)

Source from the content-addressed store, hash-verified

1function childrenText(token) {
2 let text = ""
3 for (let i = 0; i < token.children.length; i++) {
4 let child = token.children[i];
5 if (child.type == "text" || child.type == "code_inlin") text += child.content
6 }
7 return text
8}
9
10import {createHash} from "crypto"
11

Callers 1

transformTokensFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected