smartyaml/ts/index.ts
2024-04-30 17:49:25 +02:00

18 lines
425 B
TypeScript

import * as plugins from './smartyaml.plugins.js';
export let yamlStringToObject = async (
yamlStringArg: string,
): Promise<any> => {
return plugins.yaml.parse(yamlStringArg);
};
export let objectToYamlString = async (
objectArg
): Promise<string> => {
return plugins.yaml.stringify(objectArg);
};
export let getYamlDocFromString = async (stringArg: string) => {
return plugins.yaml.parseDocument(stringArg);
}