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 26, 2024
1 parent 7efe1b5 commit 333ca37
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1041,8 +1041,8 @@ result = lo.Splice([]string{"a", "b"}, 42, "1", "2")
### Keys

Creates a slice of the map keys.
> [!NOTE]
> The order of the keys isn't guaranteed to be sorted for performance reason, so sort the output slice if needed.

Use the UniqKeys variant to deduplicate common keys.

```go
keys := lo.Keys(map[string]int{"foo": 1, "bar": 2})
Expand All @@ -1060,8 +1060,6 @@ keys := lo.Keys(map[string]int{"foo": 1, "bar": 2}, map[string]int{"bar": 3})
### UniqKeys

Creates an array of the unique map keys.
> [!NOTE]
> The order of the keys isn't guaranteed to be sorted for performance reason, so sort the output slice if needed.

```go
keys := lo.Keys(map[string]int{"foo": 1, "bar": 2}, map[string]int{"baz": 3})
Expand Down Expand Up @@ -1108,9 +1106,9 @@ values := lo.Values(map[string]int{"foo": 1, "bar": 2}, map[string]int{"bar": 2}

### UniqValues

Creates an array of the unique map values.
> [!NOTE]
> The order of the values isn't guaranteed to be sorted for performance reason, so sort the output slice if needed.
Creates an array of unique map values.

Use the UniqValues variant to deduplicate common values.

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

0 comments on commit 333ca37

Please sign in to comment.