mirror of
https://github.com/samber/lo.git
synced 2026-04-22 15:37:14 +08:00
fa095e4b4f
* fix(doc): fix go playground demo URL * fix(doc): add more go playground demo URL
570 B
570 B
name, slug, sourceRef, category, subCategory, playUrl, variantHelpers, similarHelpers, position, signatures
| name | slug | sourceRef | category | subCategory | playUrl | variantHelpers | similarHelpers | position | signatures | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| CountBy | countby | slice.go#L849 | core | slice | https://go.dev/play/p/5GMQP5vNT4q |
|
|
0 |
|
Counts the number of elements for which the predicate is true.
lo.CountBy([]int{1, 5, 1}, func(i int) bool {
return i < 4
})
// 2