@valkyriestudios/utils 12.7.0 → 12.8.0
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/array/groupBy.d.ts +2 -2
- package/index.d.ts +1 -1
- package/package.json +1 -1
package/array/groupBy.d.ts
CHANGED
|
@@ -16,8 +16,8 @@ type Handler<T> = (val: T) => string | number | boolean;
|
|
|
16
16
|
* }
|
|
17
17
|
*
|
|
18
18
|
* @param {T[]} arr - Array to group
|
|
19
|
-
* @param {Handler<T>|
|
|
19
|
+
* @param {Handler<T>|keyof T} handler - String or a function, determines what to group by
|
|
20
20
|
* @returns {Record<string, T[]>}
|
|
21
21
|
*/
|
|
22
|
-
declare function groupBy<T extends Record<string, any>>(arr: T[], handler: Handler<T> |
|
|
22
|
+
declare function groupBy<T extends Record<string, any>>(arr: T[], handler: Handler<T> | keyof T): Record<string, T[]>;
|
|
23
23
|
export { groupBy, groupBy as default };
|
package/index.d.ts
CHANGED
|
@@ -69,7 +69,7 @@ declare module "object/isNotEmpty" {
|
|
|
69
69
|
}
|
|
70
70
|
declare module "array/groupBy" {
|
|
71
71
|
type Handler<T> = (val: T) => string | number | boolean;
|
|
72
|
-
function groupBy<T extends Record<string, any>>(arr: T[], handler: Handler<T> |
|
|
72
|
+
function groupBy<T extends Record<string, any>>(arr: T[], handler: Handler<T> | keyof T): Record<string, T[]>;
|
|
73
73
|
export { groupBy, groupBy as default };
|
|
74
74
|
}
|
|
75
75
|
declare module "array/shuffle" {
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{ "name": "@valkyriestudios/utils", "version": "12.
|
|
1
|
+
{ "name": "@valkyriestudios/utils", "version": "12.8.0", "description": "A collection of single-function utilities for common tasks", "author": { "name": "Peter Vermeulen", "url": "https://www.linkedin.com/in/petervermeulen1/" }, "keywords": [ "utility", "library", "javascript", "js", "node", "bun" ], "license": "MIT", "repository": { "type": "git", "url": "git+https://github.com/ValkyrieStudios/utils.git" }, "bugs": { "url": "https://github.com/ValkyrieStudios/utils/issues" }, "homepage": "https://github.com/ValkyrieStudios/utils#readme", "types": "index.d.ts" }
|