<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@easyops-cn/brick-next-pipes](./brick-next-pipes.md) &gt; [yamlStringify](./brick-next-pipes.yamlstringify.md)

## yamlStringify() function

将一个值转换为 YAML 格式的字符串（序列化）。

 Serialization

**Signature:**

```typescript
export declare function yamlStringify(value: unknown, indent?: number, opts?: DumpOptions): string;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  value | unknown | 输入值。 |
|  indent | number | 空格缩进数量（默认为 <code>2</code>）。 |
|  opts | DumpOptions | 选项 |

**Returns:**

string

序列化后的字符串；如果序列化失败（例如包含循环引用）返回 `undefined`<!-- -->。

