This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import JSON2CSV from 'json2csv'; | |
export const convertToCSV = (arr: Array<any>) => { | |
const json2csvParser = new JSON2CSV.Parser(); | |
const csv = json2csvParser.parse(arr); | |
return csv; | |
}; | |
export const downloadCSV = (csv: string, fileName = 'download.csv') => { | |
var blob = new Blob([csv], { type: 'text/csv;charset=utf-8;' }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function BroadcastChannelPolyfill() { | |
if (!('BroadcastChannel' in window)) { | |
console.log('Using BroadcastChannel polyfill') | |
window.BroadcastChannel = function(name) { | |
this.channelName = name | |
this.onmessage = function() {} | |
var self = this | |
window.addEventListener("storage", function(event) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// create-react-app v2.1.8, webpack.config.js, line 69 | |
const getStyleLoaders = (cssOptions, preProcessor) => { | |
const loaders = [ | |
isEnvDevelopment && { | |
loader: require.resolve('style-loader'), | |
options: { | |
insertInto: () => document.getElementById('root').shadowRoot, | |
} | |
}, | |
// ... |