INNER CODE UNIT · JavaScript

nodeText

tradingview/lightweight-charts · website/plugins/docs-markdown/index.js:344

function nodeText(node) {
	if (MDX_REMOVE_WHOLE.has(node.type)) {
		return '';
	}
	if (typeof node.value === 'string') {
		return node.value;
	}
	return (node.children ?? []).map(nodeText).join('');
}

/**
 * @typedef {object} CleanupContext
 * @property {string} source
 * @property {Edit[]} edits
 * @property {Heading[]} headings
 * @property {MdxComponentContext} components
 */

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…