mirror of
https://github.com/rjNemo/underscore
synced 2026-06-06 18:46:47 +00:00
- Add `Chunk` to split slices into groups of size n. - Add `ContainsBy` for predicate-based containment checks. - Add `UniqueBy` to deduplicate slices by key selector. - Add `ParallelMap` for concurrent mapping with context and error handling. - Add `maps.Keys` and `maps.Values` helpers for extracting map keys/values. - Update README and docs for new features. - Refactor `Contains` to use `slices.Contains`.
19 lines
291 B
Markdown
19 lines
291 B
Markdown
---
|
|
title: "Values"
|
|
date: 2025-09-01T00:00:00-00:00
|
|
---
|
|
|
|
`maps.Values` returns the values of a map in unspecified order.
|
|
|
|
```go
|
|
package main
|
|
|
|
import (
|
|
"fmt"
|
|
m "github.com/rjNemo/underscore/maps"
|
|
)
|
|
|
|
func main() {
|
|
fmt.Println(m.Values(map[int]string{1:"a",2:"b"})) // e.g., ["b" "a"]
|
|
}
|
|
```
|