INNER CODE UNIT · TypeScript
a1
maciejtreder/ng-toolkit · schematics/_utils/index.ts:365
a1 = A[0], a2 = A[A.length - 1], L = a1.length, i = 0;
while (i < L && a1.charAt(i) === a2.charAt(i)) i++;
toReturn = a1.substring(0, i - 1);
} else {
toReturn = getBrowserDistFolder(tree, options);
if (toReturn.lastIndexOf('/') >= 0) {
toReturn = toReturn.substr(0, toReturn.lastIndexOf('/'));
}
}
return toReturn;
}
export function isUniversal(tree: Tree, options: any): boolean {
const cliConfig: WorkspaceSchema = JSON.parse(getFileContent(tree, `${options.directory}/angular.json`));
const project: WorkspaceTargets<ProjectType.Application> | undefined = cliConfig.projects[options.clientProject].architect;
for (let property in project) {
if (project.hasOwnProperty(property) && project[property].builder === '@angular-devkit/build-angular:server') {