Socket
Socket
Sign inDemoInstall

electron-platform

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    electron-platform

Platform detection for Electron and Web Browser


Version published
Maintainers
1
Install size
14.9 kB
Created

Readme

Source

electron-platform

Linux Build Status Windows Build status Dependency Status devDependency Status

Platform detection for Electron and Web Browser.

Install

npm install --save electron-platform

Usage

const platform = require('electron-platform');

if ( platform.isRendererProcess ) {
  // do something
}

API Reference

Properties

isNode

Indicates whether executes in node.js application.

isElectron

Indicates whether executes in electron.

isNative

Indicates whether executes in native environment (compare to web-browser).

isPureWeb

Indicates whether executes in common web browser.

isRendererProcess

Indicates whether executes in common web browser, or editor's renderer process(web-page).

isMainProcess

Indicates whether executes in editor's main process.

isDarwin

Indicates whether executes in OSX.

isWin32

Indicates whether executes in Windows.

isDev

Check if running in retina display. If we are in renderer process and nodeIntegration is false, isDev will be undefined.

isRetina

Check if running in retina display.

License

MIT © 2017 Johnny Wu

Keywords

FAQs

Last updated on 19 Jan 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc