Nighttime Pachinko Marathon
    Have ideas to improve npm?Join in the discussion! »

    electron-is-dev
    TypeScript icon, indicating that this package has built-in type declarations

    2.0.0 • Public • Published

    electron-is-dev

    Check if Electron is running in development

    Useful for enabling debug features only during development.

    This package must be used from the Electron main process.

    Install

    $ npm install electron-is-dev
    

    Requires Electron 3 or later.

    Usage

    const isDev = require('electron-is-dev');
    
    if (isDev) {
    	console.log('Running in development');
    } else {
    	console.log('Running in production');
    }

    You can force development mode by setting the ELECTRON_IS_DEV environment variable to 1.

    Related

    Install

    npm i electron-is-dev

    DownloadsWeekly Downloads

    102,418

    Version

    2.0.0

    License

    MIT

    Unpacked Size

    3.37 kB

    Total Files

    5

    Last publish

    Collaborators

    • avatar