In the file TableCsv.js
you are not making your object available for external files to use. The way that this is done is via the export
statement. You can either export something (or several somethings) as named exports, so that you would need to import them with a statement like import { Thing } from 'module'
, or you can make a default export (which seems to be the case here) where the import statement then looks as follows: import Thing from 'module'
.
To export your object in TableCsv.js
add the following line to the bottom of the file:
export default TableCsv
Alternatively, change the line where you define the variable to be as follows:
export default class TableCsv {