Skip to content

Commit

Permalink
Add tapSome to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
bloodyowl committed Apr 30, 2024
1 parent a9f8ea3 commit 9a4112e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docs/docs/option.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,18 @@ Executes `func` with `option`, and returns `option`. Useful for logging and debu
option.tap(console.log).map((x) => x * 2);
```

### .tapSome(func)

```ts
Option<A>.tapSome(func: (option: A) => unknown): Option<A>
```

Executes `func` with `option`'s value if `Some`, and returns `option`. Useful for logging and debugging.

```ts title="Examples"
option.tapSome(console.log).map((x) => x * 2);
```

## Statics

### Option.isOption(value)
Expand Down

0 comments on commit 9a4112e

Please sign in to comment.