MCPcopy Create free account
hub / github.com/adobe/react-spectrum / text

Function text

packages/dev/s2-docs/src/Code.tsx:419–425  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

417}
418
419function text(node) {
420 if (node.type === 'text') {
421 return node.value;
422 } else {
423 return node.children.map(c => text(c)).join('');
424 }
425}
426
427function highlightDiff(code: string) {
428 let lines = code.split('\n');

Callers 4

Code.tsxFile · 0.70
linesFunction · 0.70
renderHastFunction · 0.70
AvatarGroup.tsxFile · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected