<!-- 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; [boolean](./brick-next-pipes.boolean.md)

## boolean() function

将一个值转换为布尔值（也可使用别名 `bool`<!-- -->）。

 Type conversion

**Signature:**

```typescript
export declare function boolean(value: unknown): boolean;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  value | unknown | 需要转换的值。 |

**Returns:**

boolean

转换后的布尔值。

## Remarks

该转换会把字符串的 `"0"` 也看作 `false`<!-- -->。

