Home > @easyops-cn/brick-next-pipes > yamlStringify
yamlStringify() function
将一个值转换为 YAML 格式的字符串(序列化)。
Serialization
Signature:
export declare function yamlStringify(value: unknown, indent?: number, opts?: DumpOptions): string;
Parameters
Parameter | Type | Description |
---|---|---|
value | unknown | 输入值。 |
indent | number | 空格缩进数量(默认为 2 )。 |
opts | DumpOptions | 选项 |
Returns:
string
序列化后的字符串;如果序列化失败(例如包含循环引用)返回 undefined
。