@elyukai/utils 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/dist/src/array/groups.d.ts +2 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [0.3.1](https://github.com/elyukai/ts-utils/compare/v0.3.0...v0.3.1) (2026-03-13)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* groupBy only produces non-empty arrays ([dce9118](https://github.com/elyukai/ts-utils/commit/dce91185c63da77a58d7b48beb15c98945491eb3))
|
|
11
|
+
|
|
5
12
|
## [0.3.0](https://github.com/elyukai/ts-utils/compare/v0.2.9...v0.3.0) (2026-03-06)
|
|
6
13
|
|
|
7
14
|
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* @module
|
|
4
4
|
*/
|
|
5
5
|
import type { Equality } from "../equality.ts";
|
|
6
|
+
import type { NonEmptyArray } from "./nonEmpty.ts";
|
|
6
7
|
/**
|
|
7
8
|
* Partitions an array into two arrays based on a predicate.
|
|
8
9
|
* @param arr The array to split.
|
|
@@ -18,7 +19,7 @@ export declare function partition<T>(arr: T[], predicate: (value: T) => boolean)
|
|
|
18
19
|
* given equality function are grouped together. Calling the `flat` method on
|
|
19
20
|
* the result will return the original array.
|
|
20
21
|
*/
|
|
21
|
-
export declare const groupBy: <T>(arr: T[], equal: Equality<T>) => T[]
|
|
22
|
+
export declare const groupBy: <T>(arr: T[], equal: Equality<T>) => NonEmptyArray<T>[];
|
|
22
23
|
/**
|
|
23
24
|
* Splits an array into chunks of a specified size.
|
|
24
25
|
* @param arr The array to be chunked.
|