Gathering detailed insights and metrics for electron-is-dev
Gathering detailed insights and metrics for electron-is-dev
Gathering detailed insights and metrics for electron-is-dev
Gathering detailed insights and metrics for electron-is-dev
npm install electron-is-dev
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
428 Stars
34 Commits
34 Forks
10 Watching
1 Branches
7 Contributors
Updated on 25 Nov 2024
JavaScript (81.36%)
TypeScript (18.64%)
Cumulative downloads
Total Downloads
Last day
-5.8%
19,534
Compared to previous day
Last week
-1.9%
110,524
Compared to previous week
Last month
11.6%
483,562
Compared to previous month
Last year
-13.7%
5,226,352
Compared to previous year
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.
1npm install electron-is-dev
Requires Electron 28 or later.
1import isDev from 'electron-is-dev'; 2 3if (isDev) { 4 console.log('Running in development'); 5} else { 6 console.log('Running in production'); 7}
You can force development mode by setting the ELECTRON_IS_DEV
environment variable to 1
.
app.isPackaged
?This package existed long before that property. The benefit of this package is that you can override the value using an environment variable.
You can use contextBridge
in the preload script to manually expose the variable:
1import {contextBridge} from 'electron'; 2import isDev from 'electron-is-dev'; 3 4contextBridge.exposeInMainWorld('isDev', isDev);
You can then access it in globalThis
from the renderer process:
1console.log(globalThis.isDev);
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 9/30 approved changesets -- score normalized to 3
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
security policy file not detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More