Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
group?,
) {
let navigationGroup: NavigationItem;
if (group) {
navigationGroup = group;
} else {
navigationGroup = getNavigationGroup(reflection);
}
let titlePrefix = '';
if (longTitle && parentNavigationItem && parentNavigationItem.title) {
titlePrefix = parentNavigationItem.title.replace(/\"/g, '') + '.';
}
const title = titlePrefix + reflection.name.replace(/\"/g, '');
const url = reflection.url;
const nav = new NavigationItem(title, url, parentNavigationItem);
nav.parent = parentNavigationItem;
navigationGroup.children.push(nav);
if (reflection.children) {
reflection.children.forEach(reflectionChild => {
if (reflectionChild.hasOwnDocument) {
addNavigationItem(longTitle, reflectionChild as DeclarationReflection, nav, navigationGroup);
}
});
}
delete nav.cssClasses;
delete nav.reflection;
return nav;
}
const isModules = this.application.options.getValue('mode') === 1;
function createNavigationGroup(name: string, url = null) {
const navigationGroup = new NavigationItem(name, url);
navigationGroup.children = [];
delete navigationGroup.cssClasses;
delete navigationGroup.reflection;
return navigationGroup;
}