Skip to content

Commit

Permalink
✏️ Rename 'created_at' #50 - Add remove todos
Browse files Browse the repository at this point in the history
  • Loading branch information
alexlee-dev committed Aug 12, 2020
1 parent bbe18ef commit ad7dfbe
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/client/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,19 @@ export const fetchServerData = async (
return data;
};

// TODO - Remove
// eslint-disable-next-line
export const groupBy = (arr: any[], key: any): any =>
arr.reduce(
(acc, item) => ((acc[item[key]] = [...(acc[item[key]] || []), item]), acc),
{}
);

// TODO - Remove
// eslint-disable-next-line
export const unique = (arr: any[]): any[] => [...new Set(arr)];

// TODO - Remove
export const validURL = (str: string): boolean => {
const pattern = new RegExp(
"^(https?:\\/\\/)?" + // protocol
Expand Down

0 comments on commit ad7dfbe

Please sign in to comment.