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

Function toText

packages/dev/s2-docs/scripts/generateAgentSkills.mjs:263–277  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

261 const tree = unified().use(remarkParse).parse(content);
262
263 const toText = node => {
264 if (!node) {
265 return '';
266 }
267 if (node.type === 'text') {
268 return node.value;
269 }
270 if (node.type === 'inlineCode') {
271 return '`' + node.value + '`';
272 }
273 if (Array.isArray(node.children)) {
274 return node.children.map(toText).join('');
275 }
276 return '';
277 };
278
279 const extractEntry = listItem => {
280 const paragraph = listItem.children?.find(child => child.type === 'paragraph');

Callers 1

extractEntryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected