Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import store from 'store';
import { remote } from 'electron';
import Path from 'path';
import y18n from 'y18n';
import isDev from 'electron-is-dev';
const env = process.env.NODE_ENV || 'production';
const i18n = y18n({
directory: Path.join(remote.app.getAppPath(), '/../static/locales').replace(/\\/g, '\\\\'),
updateFiles: false,
locale: 'en',
});
const logs = [];
const app = {
env,
store,
i18n,
logs,
log(message) {
logs.push(message);
},
};
import store from 'store';
import { remote } from 'electron';
import Path from 'path';
import y18n from 'y18n';
import isDev from 'electron-is-dev';
const env = process.env.NODE_ENV || 'production';
const i18n = y18n({
directory: Path.join(remote.app.getAppPath(), '/../static/locales').replace(/\\/g, '\\\\'),
updateFiles: false,
locale: 'en',
});
const logs = [];
const app = {
env,
store,
i18n,
logs,
log(message) {
logs.push(message);
},
};