@samber: I sometimes forget to update this file. Ping me on Twitter or open an issue in case of error. We need to keep a clear changelog for easier lib upgrade.
Breaking:
- Change of MapToSlice prototype:
MapToSlice[K comparable, V any, R any](in map[K]V, iteratee func(V, K) R) []R
->MapToSlice[K comparable, V any, R any](in map[K]V, iteratee func(K, V) R) []R
Added:
- lo.ChunkString
- lo.SliceToMap (alias to lo.Associate)
Adding:
- lo.Associate
- lo.ReduceRight
- lo.FromPtrOr
- lo.MapToSlice
- lo.IsSorted
- lo.IsSortedByKey
Adding:
- lo.FindUniques
- lo.FindUniquesBy
- lo.FindDuplicates
- lo.FindDuplicatesBy
- lo.IsNotEmpty
Adding:
- lo.Without
- lo.WithoutEmpty
Adding:
- lo.FindKey
- lo.FindKeyBy
Adding:
- lo.Slice
- lo.FromPtr
- lo.IsEmpty
- lo.Compact
- lo.ToPairs: alias to lo.Entries
- lo.FromPairs: alias to lo.FromEntries
- lo.Partial
Change:
- lo.Must + lo.MustX: add context to panic message
Fix:
- lo.Nth: out of bound exception (#137)
Adding:
- lo.ToAnySlice
- lo.FromAnySlice
Adding:
- lo.Synchronize
- lo.SumBy
Change:
- Removed generic type definition for lo.Try0:
lo.Try0[T]()
->lo.Try0()
Adding:
- lo.RepeatBy
- lo.Subset
- lo.Replace
- lo.ReplaceAll
- lo.Substring
- lo.RuneLength
Adding:
- lo.SomeBy
- lo.EveryBy
- lo.None
- lo.NoneBy
Adding:
- lo.Unpack2 -> lo.Unpack3
- lo.Async0 -> lo.Async6
Adding:
- lo.AttemptWithDelay
Improvement:
- lo.Must: error or boolean value
Adding:
- lo.Coalesce
Adding:
- PickBy
- PickByKeys
- PickByValues
- OmitBy
- OmitByKeys
- OmitByValues
- Clamp
- MapKeys
- Invert
- IfF + ElseIfF + ElseF
- T0() + T1() + T2() + T3() + ...
Adding:
- Must
- Must{0-6}
- FindOrElse
- Async
- MinBy
- MaxBy
- Count
- CountBy
- FindIndexOf
- FindLastIndexOf
- FilterMap
Adding:
- Try
- Try{0-6}
- TryWitchValue
- TryCatch
- TryCatchWitchValue
- Debounce
- Reject
Adding:
- Range
- RangeFrom
- RangeWithSteps
Added
- Drop
- DropRight
- DropWhile
- DropRightWhile
Adding Union.
Adding ContainBy
Adding MapValues
Adding FlatMap
Fixed PartitionBy.
Adding Sample
Adding Samples
Adding Times
Adding Attempt
Adding Repeat
- adding tuple types (2->9)
- adding Zip + Unzip
- adding lo.PartitionBy + lop.PartitionBy
- adding lop.GroupBy
- fixing Nth
Last and Nth return errors
Adding lop.Map
and lop.ForEach
.
Adding i int
param to lo.Map()
, lo.Filter()
, lo.ForEach()
and lo.Reduce()
predicates.
Initial release
Supported helpers for slices:
- Filter
- Map
- Reduce
- ForEach
- Uniq
- UniqBy
- GroupBy
- Chunk
- Flatten
- Shuffle
- Reverse
- Fill
- ToMap
Supported helpers for maps:
- Keys
- Values
- Entries
- FromEntries
- Assign (maps merge)
Supported intersection helpers:
- Contains
- Every
- Some
- Intersect
- Difference
Supported search helpers:
- IndexOf
- LastIndexOf
- Find
- Min
- Max
- Last
- Nth
Other functional programming helpers:
- Ternary (1 line if/else statement)
- If / ElseIf / Else
- Switch / Case / Default
- ToPtr
- ToSlicePtr
Constraints:
- Clonable