Skip to content

Releases: elliotchance/pie

v1.30.1

19 May 05:06
7815c31
Compare
Choose a tag to compare
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

19 May 02:29
Compare
Choose a tag to compare
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

19 May 02:19
Compare
Choose a tag to compare
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

19 May 02:13
Compare
Choose a tag to compare
DropTop: Fix memory overlap (#146)

Fixes #145

v1.28.1

18 May 06:30
Compare
Choose a tag to compare
Median: Linear algorithm (#132)

Median optimized implementation. Benchmarks ready for Old vs New. Verifying that result it the same.

Fixes #91

v1.28.0

17 May 04:10
Compare
Choose a tag to compare
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

14 May 12:18
Compare
Choose a tag to compare
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

14 May 12:10
Compare
Choose a tag to compare
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

14 May 03:46
Compare
Choose a tag to compare
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

13 May 23:53
Compare
Choose a tag to compare
added: DropTop (#129)

DropTop returns a new slice after dropping the top n elements.