dhavaltank-js-utils 0.0.2 → 0.0.3
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/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -359,7 +359,7 @@ var groupBy = (arr, key) => {
|
|
|
359
359
|
return arr;
|
|
360
360
|
return arr.reduce((acc, obj) => {
|
|
361
361
|
const keyValue = obj[key];
|
|
362
|
-
(acc[keyValue]
|
|
362
|
+
(acc[keyValue] ??= []).push(obj);
|
|
363
363
|
return acc;
|
|
364
364
|
}, {});
|
|
365
365
|
} catch (error) {
|
package/dist/index.js
CHANGED
|
@@ -307,7 +307,7 @@ var groupBy = (arr, key) => {
|
|
|
307
307
|
return arr;
|
|
308
308
|
return arr.reduce((acc, obj) => {
|
|
309
309
|
const keyValue = obj[key];
|
|
310
|
-
(acc[keyValue]
|
|
310
|
+
(acc[keyValue] ??= []).push(obj);
|
|
311
311
|
return acc;
|
|
312
312
|
}, {});
|
|
313
313
|
} catch (error) {
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dhavaltank-js-utils",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "JavaScript Utility Package which is a collection of functions i use regularly and don't want to write again",
|
|
5
|
-
"main": "./dist/index.
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"types": "./dist/index.d.ts",
|