smartyaml/ts/index.ts

16 lines
397 B
TypeScript
Raw Normal View History

import * as plugins from './smartyaml.plugins';
2017-05-25 13:09:01 +00:00
export let yamlStringToObject = async (
yamlStringArg,
optionsArg: plugins.jsYaml.LoadOptions = {}
): Promise<any> => {
return plugins.jsYaml.safeLoad(yamlStringArg);
};
2017-05-25 13:09:01 +00:00
export let objectToYamlString = async (
objectArg,
optionsArg: plugins.jsYaml.DumpOptions = {}
): Promise<string> => {
return plugins.jsYaml.safeDump(objectArg);
};