UNPKG

@ngrx/schematics

Version:

NgRx Schematics for Angular

1 lines 882 B
{"version":3,"file":"json-utilts.js","sourceRoot":"","sources":["../../../../../modules/schematics/schematics-core/utility/json-utilts.ts"],"names":[],"mappings":";;AACA,0DAYC;AAbD,uGAAuG;AACvG,SAAgB,uBAAuB,CACrC,IAAS,EACT,YAAoB;IAEpB,IAAI,SAAS,GAAe,IAAI,CAAC;IACjC,KAAK,MAAM,QAAQ,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;QACvC,IAAI,QAAQ,CAAC,GAAG,CAAC,KAAK,IAAI,YAAY,EAAE,CAAC;YACvC,SAAS,GAAG,QAAQ,CAAC,KAAK,CAAC;QAC7B,CAAC;IACH,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["// https://github.com/angular/angular-cli/blob/master/packages/schematics/angular/utility/json-utils.ts\nexport function findPropertyInAstObject(\n node: any,\n propertyName: string\n): any | null {\n let maybeNode: any | null = null;\n for (const property of node.properties) {\n if (property.key.value == propertyName) {\n maybeNode = property.value;\n }\n }\n\n return maybeNode;\n}\n"]}