/
githubmirror
/
atom
Обзор
Документация
Войти
/
githubmirror
/
atom
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/get-app-name.js
19 строк
493 B
Rafael Oleza
Make get-app-name module compatible with the renderer process
04 июл 2019, 16:21
04 июл 2019, 16:21
f0a4dcd
Код
Авторство
О чём код?
const { app } = require('electron'); const getReleaseChannel = require('./get-release-channel'); module.exports = function getAppName() { if (process.type === 'renderer') { return atom.getAppName(); } const releaseChannel = getReleaseChannel(app.getVersion()); const appNameParts = [app.getName()]; if (releaseChannel !== 'stable') { appNameParts.push( releaseChannel.charAt(0).toUpperCase() + releaseChannel.slice(1) ); } return appNameParts.join(' '); };