fix(core): update
This commit is contained in:
14
ts/index.ts
14
ts/index.ts
@@ -1,15 +1,17 @@
|
||||
import * as plugins from './smartyaml.plugins.js';
|
||||
|
||||
export let yamlStringToObject = async (
|
||||
yamlStringArg,
|
||||
optionsArg: plugins.jsYaml.LoadOptions = {}
|
||||
yamlStringArg: string,
|
||||
): Promise<any> => {
|
||||
return plugins.jsYaml.load(yamlStringArg);
|
||||
return plugins.yaml.parse(yamlStringArg);
|
||||
};
|
||||
|
||||
export let objectToYamlString = async (
|
||||
objectArg,
|
||||
optionsArg: plugins.jsYaml.DumpOptions = {}
|
||||
objectArg
|
||||
): Promise<string> => {
|
||||
return plugins.jsYaml.dump(objectArg);
|
||||
return plugins.yaml.stringify(objectArg);
|
||||
};
|
||||
|
||||
export let getYamlDocFromString = async (stringArg: string) => {
|
||||
return plugins.yaml.parseDocument(stringArg);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user