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; };