Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function toYAML(obj: any): string {
const oldFold = yamlTypes.strOptions.fold.lineWidth;
try {
yamlTypes.strOptions.fold.lineWidth = 0;
return YAML.stringify(obj, { schema: 'yaml-1.1' });
} finally {
yamlTypes.strOptions.fold.lineWidth = oldFold;
}
}
export function toYAML(obj: any): string {
const oldFold = yamlTypes.strOptions.fold.lineWidth;
try {
yamlTypes.strOptions.fold.lineWidth = 0;
return YAML.stringify(obj, { schema: 'yaml-1.1' });
} finally {
yamlTypes.strOptions.fold.lineWidth = oldFold;
}
}