As I am using React in ES6 and am using Jquery-CSV library, I was unable to import using
var $ = jQuery = require('jquery');
require('./jquery.csv.js');
Found a way to import using
import * as randomName from 'jquery-csv'
Now how am I able to use
$.csv.toArrays(csv);```/```$.csv.toObjects(csv);?
I tried to play around by using names as prefix like randomName.csv.toArrays()
but no luck.
EDIT:
randomName.toArray(csv);
this works,
but now I am getting the following error
TypeError: csv.replace is not a function
How to solve this?