From e4c91f44ab59fa99e5d751648f4881dc3edb8944 Mon Sep 17 00:00:00 2001 From: Jover Date: Fri, 27 Aug 2021 19:13:38 -0700 Subject: [PATCH] rename parseCsvTsv to parseCsv --- src/actions/filesDropped/metadata.js | 4 ++-- src/actions/filesDropped/{parseCsvTsv.js => parseCsv.js} | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) rename src/actions/filesDropped/{parseCsvTsv.js => parseCsv.js} (94%) diff --git a/src/actions/filesDropped/metadata.js b/src/actions/filesDropped/metadata.js index de1c875e6..3f1dd9545 100644 --- a/src/actions/filesDropped/metadata.js +++ b/src/actions/filesDropped/metadata.js @@ -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) => { @@ -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(", ")); diff --git a/src/actions/filesDropped/parseCsvTsv.js b/src/actions/filesDropped/parseCsv.js similarity index 94% rename from src/actions/filesDropped/parseCsvTsv.js rename to src/actions/filesDropped/parseCsv.js index c3f099a42..b440420a7 100644 --- a/src/actions/filesDropped/parseCsvTsv.js +++ b/src/actions/filesDropped/parseCsv.js @@ -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, {