function isDevMode(execPath) {
  const executablePath = execPath ?? process.argv0;
  return /[\\/]electron.*$/.test(executablePath);
}
Checks if the application is running in Development mode.

@param {string?} execPath
Path of the executable. Typically `argv[0]`.
If left blank, current executable path will be used.