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;
|
||||
}, {});
|
||||
};
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { MESSAGE_TYPE } from 'widget/helpers/constants';
|
||||
import groupBy from 'lodash.groupby';
|
||||
import { groupBy } from 'widget/helpers/utils';
|
||||
import { groupConversationBySender } from './helpers';
|
||||
import { formatUnixDate } from 'shared/helpers/DateHelper';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user