fix(core): update

This commit is contained in:
2024-04-30 17:49:25 +02:00
parent 343c7dbe8b
commit 46602bcb44
8 changed files with 5209 additions and 471 deletions

View File

@ -2,7 +2,7 @@
* autocreated commitinfo by @pushrocks/commitinfo
*/
export const commitinfo = {
name: '@pushrocks/smartyaml',
version: '3.0.1',
description: 'handle yaml in smart ways'
name: '@push.rocks/smartyaml',
version: '3.0.2',
description: 'A module for smart handling of YAML data with support for converting between YAML strings and JavaScript objects.'
}

View File

@ -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);
}

View File

@ -1,3 +1,3 @@
import * as jsYaml from 'js-yaml';
import * as yaml from 'yaml';
export { jsYaml };
export { yaml };