Releases: thoas/go-funk
Releases · thoas/go-funk
v0.9.3
v0.9.2
v0.9.1
v0.9.0
- (BC) Typesafe
Min*
,Max*
previously returned a nil pointer when the argument does not contain any items, it has been changed to have a typesafe signature and it panics - Add
StringerJoin
which joins an array of elements which implement theString() string
function (thks @arnovanliere) - Update
Get
to allows zero values with the optionWithAllowZero
(thks @roneli) - Add typesafe bool functions
FilterBool
,ContainsBool
,InBools
,IndexOfBool
,LastIndexOfBool
,UniqBool
,DropBool
,ShuffleBool
,ReverseBools
(thks @arnovanliere) - Update
Zip
to panic when the passing argument is not a slice / array
v0.8.0
Reduce
now returns an interface- Add
FlapMap
which manipulates an iteratee (map, slice) and transforms it to to a flattened collection of another type - Add support for
map
when usingGet
- Add
Set
which sets value at a path of a struct - Add
DifferenceInt64
,DifferenceInt32
,DifferenceInt
,DifferenceUInt
,DifferenceUInt32
,DifferenceUInt64
- Add
Flatten
which flattens a two-dimensional array. - Add
Prune
which returns a copy of "in" that only contains fields in "paths"
Thank you @youyuanwu @vellotis @guyarb @nohponex @CengSin @samber @HarryWang29
v0.7.0
- Add
Join
which combines two collections using the given join method (thks @xunleii) - Add
Without
which creates an array excluding all given values (thks @xunleii) - Add
Subset
which returns true if a collection is a subset of another (thks @reetuparna) - Add Join operations, primitives (
InnerJoin
,OuterJoin
,LeftJoin
,RightJoin
) and typesafe implementations (thks @xunleii) - Fixed input mutation in
Uniq
, it returns a copy of the input without the duplicate - Fixed some typos (thks @anukul)
- Fixed
SubtractString
when an empty array is passed (thks @alongat)
v0.6.0
- Add
Intersect
returns the intersection between two collections (thks @samber) - Add
Difference
returns the difference between two collections (thks @samber) - Add
GetOrElse
retrieves the value of the point or default (thks @samber) - Add
Subtract
the subtraction between two collections. It preserves order (thks @airani) - Fix bug in
lastIndexOf
(thks @kkty)
v0.5.0
- Add
Max*
methods (thks @abshek) - Add
Min*
methods (thks @CatInCosmicSpace) - Fix typos (thks @flowonyx)
- Handle zero value in
Chunk
- Add
FindKey
to iterate over elements of collection, returning the first - Add
Some
to return true if at least one element is present in an iteratee
v0.4.0
v0.3.0
- More Go versions have been added to the CI (thks @ferhatelmas, @HaraldNordgren)
- Add
Compact
(thks @poporul) - Add
Reduce
which reduces an iterable based on a function (thks @poporul) - Add
Zip
which zip two iterables (thks @HaraldNordgren) - Add
Fill
which fills an iterable with a value (thks @HaraldNordgren) - Add
Every
which returns true if every element is present in a iteratee (thks @HaraldNordgren) - Add
Any
which returns true if any element of the iterable is not empty. If the iterable is empty, return False. - Add
All
which returns true if all elements of the iterable are not empty (or if the iterable is empty) - Add
ConvertSlice
which converts a slice to a desired type - Add
Drop
which creates an array/slice withn
elements dropped from the beginning (thks @spoonscen) - Missing documentation for
Compact
andReduce
(thks @alexander-yu) - Reduce memory usage for
Uniq
functions (thks @orvice)