MCPcopy Index your code
hub / github.com/angular/angularfire / safeReadJSON

Function safeReadJSON

src/schematics/common.ts:21–28  ·  view source on GitHub ↗
(path: string, tree: Tree)

Source from the content-addressed store, hash-verified

19};
20
21export function safeReadJSON(path: string, tree: Tree) {
22 try {
23 // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
24 return JSON.parse(tree.read(path)!.toString());
25 } catch (e) {
26 throw new SchematicsException(`Error when parsing ${path}: ${e.message}`);
27 }
28}
29
30export const addDependencies = (
31 host: Tree,

Callers 3

ngUpdateFunction · 0.90
addDependenciesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected