initial working version
This commit is contained in:
9
ts/index.ts
Normal file
9
ts/index.ts
Normal file
@ -0,0 +1,9 @@
|
||||
import * as plugins from './smartyaml.plugins'
|
||||
|
||||
export let yamlStringToObject = async (yamlStringArg, optionsArg: plugins.jsYaml.LoadOptions = {}): Promise<any> => {
|
||||
return plugins.jsYaml.safeLoad(yamlStringArg)
|
||||
}
|
||||
|
||||
export let objectToYamlString = async (objectArg, optionsArg:plugins.jsYaml.DumpOptions = {}): Promise<string> => {
|
||||
return plugins.jsYaml.safeDump(objectArg)
|
||||
}
|
6
ts/smartyaml.plugins.ts
Normal file
6
ts/smartyaml.plugins.ts
Normal file
@ -0,0 +1,6 @@
|
||||
import 'typings-global'
|
||||
import * as jsYaml from 'js-yaml'
|
||||
|
||||
export {
|
||||
jsYaml
|
||||
}
|
Reference in New Issue
Block a user