Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
static toYaml(optionsDict) {
for (let parameter in optionsDict) {
if (parameter.startsWith('YAML_')) {
let yamlString = yamljs.stringify(optionsDict[parameter], 8);
let varName = parameter.replace('YAML_', '');
optionsDict[varName] = yamlString;
delete optionsDict[parameter];
} else {
if (typeof optionsDict[parameter] == 'object') {
optionsDict[parameter] = this.toYaml(optionsDict[parameter]);
}
}
}
return optionsDict;
}