autoformat more easy files

This commit is contained in:
Zeke Sikelianos 2016-03-25 12:57:17 -07:00 committed by Kevin Sawicki
parent 67fa250020
commit 3855a774ab
19 changed files with 1068 additions and 1076 deletions

View file

@ -1,27 +1,27 @@
const ipcRenderer = require('electron').ipcRenderer;
const deprecate = require('electron').deprecate;
const EventEmitter = require('events').EventEmitter;
const ipcRenderer = require('electron').ipcRenderer
const deprecate = require('electron').deprecate
const EventEmitter = require('events').EventEmitter
// This module is deprecated, we mirror everything from ipcRenderer.
deprecate.warn('ipc module', 'require("electron").ipcRenderer');
deprecate.warn('ipc module', 'require("electron").ipcRenderer')
// Routes events of ipcRenderer.
var ipc = new EventEmitter;
var ipc = new EventEmitter
ipcRenderer.emit = function(channel, event, ...args) {
ipc.emit.apply(ipc, [channel].concat(args));
return EventEmitter.prototype.emit.apply(ipcRenderer, arguments);
};
ipcRenderer.emit = function (channel, event, ...args) {
ipc.emit.apply(ipc, [channel].concat(args))
return EventEmitter.prototype.emit.apply(ipcRenderer, arguments)
}
// Deprecated.
for (var method in ipcRenderer) {
if (method.startsWith('send')) {
ipc[method] = ipcRenderer[method];
ipc[method] = ipcRenderer[method]
}
}
deprecate.rename(ipc, 'sendChannel', 'send');
deprecate.rename(ipc, 'sendChannel', 'send')
deprecate.rename(ipc, 'sendChannelSync', 'sendSync');
deprecate.rename(ipc, 'sendChannelSync', 'sendSync')
module.exports = ipc;
module.exports = ipc