Skip to content

Commit

Permalink
bump v1.38.0
Browse files Browse the repository at this point in the history
  • Loading branch information
samber committed Mar 20, 2023
1 parent 56f34e0 commit c1cc5a0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Expand Up @@ -7,6 +7,13 @@
Adding:
- lo.ValueOr
- lo.DebounceBy
- lo.EmptyableToPtr

Improvement:
- Substring: add support for non-english chars

Fix:
- Async: Fix goroutine leak

## 1.37.0 (2022-12-15)

Expand Down
2 changes: 2 additions & 0 deletions slice.go
Expand Up @@ -51,6 +51,8 @@ func FilterMap[T any, R any](collection []T, callback func(item T, index int) (R
}

// FlatMap manipulates a slice and transforms and flattens it to a slice of another type.
// The transform function can either return a slice or a `nil`, and in the `nil` case
// no value is added to the final slice.
// Play: https://go.dev/play/p/YSoYmQTA8-U
func FlatMap[T any, R any](collection []T, iteratee func(item T, index int) []R) []R {
result := make([]R, 0, len(collection))
Expand Down

0 comments on commit c1cc5a0

Please sign in to comment.