2022-05-20 13:22:56 +00:00
|
|
|
import * as plugins from './smartyaml.plugins.js';
|
2017-05-25 13:09:01 +00:00
|
|
|
|
2018-08-26 18:20:23 +00:00
|
|
|
export let yamlStringToObject = async (
|
|
|
|
yamlStringArg,
|
|
|
|
optionsArg: plugins.jsYaml.LoadOptions = {}
|
|
|
|
): Promise<any> => {
|
2022-05-20 13:22:56 +00:00
|
|
|
return plugins.jsYaml.load(yamlStringArg);
|
2018-08-26 18:20:23 +00:00
|
|
|
};
|
2017-05-25 13:09:01 +00:00
|
|
|
|
2018-08-26 18:20:23 +00:00
|
|
|
export let objectToYamlString = async (
|
|
|
|
objectArg,
|
|
|
|
optionsArg: plugins.jsYaml.DumpOptions = {}
|
|
|
|
): Promise<string> => {
|
2022-05-20 13:22:56 +00:00
|
|
|
return plugins.jsYaml.dump(objectArg);
|
2018-08-26 18:20:23 +00:00
|
|
|
};
|