Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
samber authored Jul 29, 2024
1 parent e7746b7 commit 2642e6d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1061,7 +1061,7 @@ keys := lo.Keys(map[string]int{"foo": 1, "bar": 2}, map[string]int{"bar": 3})

### UniqKeys

Creates an array of the unique map keys.
Creates an array of unique map keys.

```go
keys := lo.Keys(map[string]int{"foo": 1, "bar": 2}, map[string]int{"baz": 3})
Expand All @@ -1071,7 +1071,7 @@ keys := lo.Keys(map[string]int{"foo": 1, "bar": 2}, map[string]int{"bar": 3})
// []string{"foo", "bar"}
```

[[play](https://go.dev/play/p/RyIE6Pb5dVS)]
[[play](https://go.dev/play/p/TPKAb6ILdHk)]

### HasKey

Expand Down Expand Up @@ -1111,17 +1111,17 @@ values := lo.Values(map[string]int{"foo": 1, "bar": 2}, map[string]int{"bar": 2}
Creates an array of unique map values.

```go
values := lo.Values(map[string]int{"foo": 1, "bar": 2})
values := lo.UniqValues(map[string]int{"foo": 1, "bar": 2})
// []int{1, 2}

values := lo.Values(map[string]int{"foo": 1, "bar": 2}, map[string]int{"baz": 3})
values := lo.UniqValues(map[string]int{"foo": 1, "bar": 2}, map[string]int{"baz": 3})
// []int{1, 2, 3}

values := lo.Values(map[string]int{"foo": 1, "bar": 2}, map[string]int{"bar": 2})
values := lo.UniqValues(map[string]int{"foo": 1, "bar": 2}, map[string]int{"bar": 2})
// []int{1, 2}
```

[[play](https://go.dev/play/p/RxsJbnaJn3I)]
[[play](https://go.dev/play/p/nf6bXMh7rM3)]

### ValueOr

Expand Down

0 comments on commit 2642e6d

Please sign in to comment.