INNER CODE UNIT · JavaScript

buildDocItemNode

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

function buildDocItemNode(item, docsById, baseUrl, contentRoot) {
	if ((item.type !== 'doc' && item.type !== 'ref') || item.id === undefined) {
		return null;
	}
	const doc = docsById.get(item.id);
	return doc === undefined ? null : toDocNode(doc, baseUrl, contentRoot);
}

/**
 * Pages that sit at the root of a sidebar (Getting started, Panes, iOS…) have
 * no category of their own, and a page listed after a category would otherwise
 * read as if it belonged to it. Hoisting them keeps every page under the
 * heading it actually belongs to.
 *
 * @param {DocsNode[]} nodes
 * @returns {DocsNode[]}
 */
function hoistRootDocs(nodes) {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…