INNER CODE UNIT · TypeScript
yamlParse
org-formation/org-formation-cli · src/yaml-cfn/index.ts:129
export const yamlParse = (input: string): any => {
return yaml.load(input, { schema: cfnSchema });
};
export const nunjucksParse = (input: string, filename: string, templatingContext: any): any => {
const rendered = env.renderString(input, templatingContext);
if (NunjucksDebugSettings.debug) {
debugWriteNunjucksTemplate(filename, input, templatingContext, rendered);
}
return yaml.load(rendered, { schema: cfnSchema });
};
export const yamlDump = (input: any): string => {
return yaml.dump(input, { schema: cfnSchema });
};
export const nunjucksRender = (input: string, filename: string, templatingContext: any): string => {
const rendered = env.renderString(input, templatingContext);