---
name: "up.util.presence"
area: "API"
kind: "JavaScript function"
parent: "up.util module"
url: "https://unpoly.com/api/up.util.presence"
---
<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.presence(value, [tester])

Returns the given argument if the argument is [present](https://unpoly.com/api/up.util.isPresent.md), otherwise returns `undefined`.

---

## Parameters {#parameters}

### value {#value}

(required)

Type: any

### [tester=up.util.isPresent] {#tester}

(optional)

The function that will be used to test whether the argument is present.

Type: Function(value): boolean

---

## Return value {#return-value}

Type: any | undefined

