Refactoring

This commit is contained in:
Scott E. Graves
2019-06-08 00:03:05 -05:00
parent 05128febd9
commit 798980cbbd
7 changed files with 58 additions and 62 deletions

13
src/utils.js Normal file
View File

@@ -0,0 +1,13 @@
const ipcRenderer = (!process.versions.hasOwnProperty('electron') && window && window.require) ?
window.require('electron').ipcRenderer :
null;
export const extractFileNameFromURL = url => {
const parts = url.split('/');
return parts[parts.length - 1];
};
export const getIPCRenderer = () => {
return ipcRenderer;
};