diff --git a/app/utils/sortBy.js b/app/utils/sortBy.js new file mode 100644 index 0000000..25a102e --- /dev/null +++ b/app/utils/sortBy.js @@ -0,0 +1,4 @@ +// @flow +/* eslint-disable max-len */ +// $FlowFixMe +export default (field: string) => (arr: T[]): T[] => arr.sort((a, b) => (a[field] < b[field] ? 1 : -1));