INNER CODE UNIT · JavaScript

childrenCids

NodeBB/NodeBB · src/categories/index.js:279

	const childrenCids = await cache.get(cacheKey, async () => {
		await recursive(key);
		return Array.from(allCids);
	});
	return childrenCids.slice();
};

Categories.flattenCategories = function (allCategories, categoryData) {
	categoryData.forEach((category) => {
		if (category) {
			allCategories.push(category);

			if (Array.isArray(category.children) && category.children.length) {
				Categories.flattenCategories(allCategories, category.children);
			}
		}
	});
};

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…