INNER CODE UNIT · TypeScript
openBraces
maciejtreder/ng-toolkit · schematics/_utils/index.ts:223
openBraces = openingBraces - closingBraces;
if (openBraces == 0 && openingBraces > 0) {
break;
}
}
let methodContent = fileContent.substr(0, methodLength);
return methodContent;
} else {
return null;
}
}
export function getMethodBody(tree: Tree, filePath: string, name: string): string | null {
let fileContent = getFileContent(tree, filePath);
let results: any = fileContent.match(new RegExp("(?:public|private|).*" + name + ".*?\\(((\\s.*?)*)\\).*\\s*{"));
if (results) {