JAVASCRIPT   119

index.js

Guest on 19th July 2021 07:16:00 PM

  1. /**
  2.  * Detect Electron renderer process, which is node, but we should
  3.  * treat as a browser.
  4.  */
  5.  
  6. if (typeof process !== 'undefined' && process.type === 'renderer') {
  7.   module.exports = require('./browser.js');
  8. } else {
  9.   module.exports = require('./node.js');
  10. }

Raw Paste


Login or Register to edit or fork this paste. It's free.