---
name: "up.util.uniqBy"
area: "API"
kind: "JavaScript function"
parent: "up.util module"
visibility: "experimental"
url: "https://unpoly.com/api/up.util.uniqBy"
---
<nav aria-label="Unpoly docs">[All docs](https://unpoly.com/index.md) · [up.util module](https://unpoly.com/api/up.util.md)</nav>

# up.util.uniqBy(array)

**This feature is experimental**. Please [share](https://github.com/unpoly/unpoly/discussions) your experiences so we know what to keep or change.

This function is like [`uniq`](https://unpoly.com/api/up.util.uniq.md), except that the given function is invoked for each element to generate the value for which uniqueness is computed.

---

## Parameters {#parameters}

### array {#array}

(required)

Type: [Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)

### array

(required)

Type: Function(value): any

---

## Return value {#return-value}

Type: [Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)

