chore: Replace packages with native functions (#5140)
This commit is contained in:
@@ -36,3 +36,10 @@ export const RNHelper = {
|
||||
);
|
||||
},
|
||||
};
|
||||
|
||||
export const groupBy = (array, predicate) => {
|
||||
return array.reduce((acc, value) => {
|
||||
(acc[predicate(value)] ||= []).push(value);
|
||||
return acc;
|
||||
}, {});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user