UNPKG

317 BJavaScriptView Raw
1import { safeLoad } from 'js-yaml';
2export function parseConfigFile(ymlString) {
3 if (typeof process !== 'undefined' && 'env' in process) {
4 ymlString = ymlString.replace(/\$\{(.*)\}/g, (str, variable, index) => process.env[variable]);
5 }
6 return safeLoad(ymlString);
7}
8//# sourceMappingURL=yml.js.map
\No newline at end of file