UNPKG

subhasmitalmg-react-spreadsheet-import

Version:

React spreadsheet import for xlsx and csv files with column matching and validation steps

6 lines (3 loc) 195 B
import uniqBy from 'lodash/uniqBy'; const uniqueEntries = (data, index) => uniqBy(data.map((row) => ({ entry: row[index] })), "entry").filter(({ entry }) => !!entry); export { uniqueEntries };