<!-- 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; [uniq](./brick-next-pipes.uniq.md)

## uniq() function

获取一个数组去重后的新数组。

 Array

**Signature:**

```typescript
export declare function uniq<T>(array: T[]): T[];
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  array | T\[\] | 数组。 |

**Returns:**

T\[\]

去重后的数组。

## Remarks

透传调用 [\_.uniq](https://lodash.com/docs/#uniq)<!-- -->。

## Example


```ts
uniq([2, 1, 2]);
// => [2, 1]
```


