Skip to main content

@webda/coreReadme | API


Variable: YAMLUtils

const YAMLUtils: Object

Expose basic YAML function

Type declaration

duplicate

duplicate: (value) => any = JSONUtils.duplicate

Duplicate an object using serializer

Parameters

value: any

Returns

any

loadFile

loadFile: (filename) => any

Helper to FileUtils.save

Parameters

filename: string

Returns

any

parse

parse: (value) => any

Parse a single or multiple document yaml

Parameters

value: any

to parse

Returns

any

object parsed

saveFile

saveFile: (object, filename, publicAudience?) => void

Helper to FileUtils.save

Parameters

object: any

filename: string

publicAudience?: boolean

Returns

void

stringify

stringify: (value, options) => string

YAML helper

Parameters

value: any

to serialize

options: any= undefined

as defined by https://eemeli.org/yaml/v1/#yaml-stringify

Returns

string

Source

packages/core/src/utils/serializers.ts:457