Releases: elliotchance/pie
Releases · elliotchance/pie
v1.30.1
README: Generate from functions (#149) The table and more detailed descriptions of the functions are now generated. This means one less step for submitting a PR and will ensure it is always up to date. Fixes #105
v1.30.0
Added JSONBytesIndent and JSONStringIndent (#147) JSONBytesIndent and JSONStringIndent return the JSON encoded array as bytes or strings respectively with indent applied. One important thing to note is that it will treat a nil slice as an empty slice to ensure that the JSON value return is always an array. See json.MarshalIndent for details.
v1.29.0
Mode: Added (#142) Mode returns a new slice containing the most frequently occurring values. The number of items returned may be the same as the input or less. It will never return zero items unless the input slice has zero items. Fixes #68
v1.28.2
DropTop: Fix memory overlap (#146) Fixes #145
v1.28.1
Median: Linear algorithm (#132) Median optimized implementation. Benchmarks ready for Old vs New. Verifying that result it the same. Fixes #91
v1.28.0
added: SubSlice() (#144) SubSlice will return the subSlice from start to end (excluded) Condition 1: If start < 0 or end < 0, nil is returned. Condition 2: If start >= end, nil is returned. Condition 3: Return all elements that exist in the range provided, if start or end is out of bounds, zero items will be placed. Fixes #24
v1.27.0
added: FindFirstUsing (#140) FindFirstUsing will return the index of the first element when the callback returns true or -1 if no element is found. It follows the same logic as the findIndex() function in Javascript. If the list is empty then -1 is always returned.
v1.26.1
Add brackets around Equals() expression (#141) Now it puts brackets only when before expr there's '!' symbol go fmt shouted at expr like (a == b). Fixes #139
v1.26.0
added: JSONBytes (#135) JSONBytes returns the JSON encoded array as bytes. One important thing to note is that it will treat a nil slice as an empty slice to ensure that the JSON value return is always an array. Fixes #40
v1.25.0
added: DropTop (#129) DropTop returns a new slice after dropping the top n elements.