> For AI agents: the complete documentation index is available at https://massaman.dev/llms.txt, the full documentation bundle is available at https://massaman.dev/llms-full.txt.

# either

Returns a predicate that checks if a value satisfies either predicate.

Binary OR combinator — shorthand for `anyPass([f, g])`. When both inputs
are type guards, the result narrows to the union of their target types.

```typescript
const isNilOrEmpty = either(isNil, (s: string) => s === '')
isNilOrEmpty(null)
```

## Usage

### `either<T>(f: (value: T) => boolean, g: (value: T) => boolean)`

Returns a predicate that checks if a value satisfies either predicate.

Binary OR combinator — shorthand for `anyPass([f, g])`. When both inputs
are type guards, the result narrows to the union of their target types.

```typescript
import { either } from 'massaman'
// or:  import { either } from 'massaman/predicate'

const isNilOrEmpty = either(isNil, (s: string) => s === '')
isNilOrEmpty(null)
```

#### Parameters


f(value: T) => booleanrequired

the first predicate.


g(value: T) => booleanrequired

the second predicate.

#### Returns

a predicate that returns `true` when either predicate passes.

```typescript
(value: T) => boolean
```
