import uniqBy from 'lodash/uniqBy'; import { MatchColumnsProps, MatchedOptions, } from '@/spreadsheet-import/steps/components/MatchColumnsStep/MatchColumnsStep'; export const uniqueEntries = ( data: MatchColumnsProps['data'], index: number, ): Partial>[] => uniqBy( data.map((row) => ({ entry: row[index] })), 'entry', ).filter(({ entry }) => !!entry);