Skip to content

Commit

Permalink
rename parseCsvTsv to parseCsv
Browse files Browse the repository at this point in the history
  • Loading branch information
joverlee521 committed Sep 3, 2021
1 parent 78b3671 commit e4c91f4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/actions/filesDropped/metadata.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { rgb } from "d3-color";
import { errorNotification, successNotification, warningNotification } from "../notifications";
import { ADD_EXTRA_METADATA } from "../types";
import { parseCsvTsv } from "./parseCsvTsv";
import { parseCsv } from "./parseCsv";


const handleMetadata = async (dispatch, getState, file) => {
Expand All @@ -18,7 +18,7 @@ const handleMetadata = async (dispatch, getState, file) => {

/* All accepted file formats have been converted to CSV string by xlsx */
/* Use papaparse to parse & interrogate the CSV string */
const {errors, data, meta} = await parseCsvTsv(sheetAsCsv);
const {errors, data, meta} = await parseCsv(sheetAsCsv);
if (errors.length) {
console.error(errors);
throw new Error(errors.map((e) => e.message).join(", "));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ let Papa; /* lazyily imported once a file is dropped on */
* to the config, which may work
* @param {string} csvString a string of delimited text
*/
export const parseCsvTsv = async (csvString) => {
export const parseCsv = async (csvString) => {
if (!Papa) Papa = (await import("papaparse")).default;
return new Promise((resolve, reject) => {
Papa.parse(csvString, {
Expand Down

0 comments on commit e4c91f4

Please sign in to comment.