Platform detection for Electron and Web Browser.
npm install --save electron-platform
const platform = require('electron-platform');
if ( platform.isRendererProcess ) {
// do something
}
Indicates whether executes in node.js application.
Indicates whether executes in electron.
Indicates whether executes in native environment (compare to web-browser).
Indicates whether executes in common web browser.
Indicates whether executes in common web browser, or editor's renderer process(web-page).
Indicates whether executes in editor's main process.
Indicates whether executes in OSX.
Indicates whether executes in Windows.
Check if running in retina display. If we are in renderer process and nodeIntegration
is false, isDev will be undefined.
Check if running in retina display.
Author: Electron-utils
Source Code: https://github.com/electron-utils/electron-platform
License: MIT license