Standardize: TO JSCS!

This commit is contained in:
Nicholas Hubbard
2016-04-05 14:35:11 -04:00
parent 18390503b5
commit 426728058c
28 changed files with 623 additions and 653 deletions

View File

@@ -28,7 +28,7 @@ var Module = Class.extend({
* Is called when the module is started.
*/
start: function() {
Log.info('Starting module: ' + this.name);
Log.info("Starting module: " + this.name);
},
/* getScripts()
@@ -82,9 +82,9 @@ var Module = Class.extend({
*/
notificationReceived: function(notification, payload, sender) {
if (sender) {
Log.log(this.name + ' received a module notification: ' + notification + ' from sender: ' + sender.name);
Log.log(this.name + " received a module notification: " + notification + " from sender: " + sender.name);
} else {
Log.log(this.name + ' received a system notification: ' + notification);
Log.log(this.name + " received a system notification: " + notification);
}
},
@@ -95,10 +95,9 @@ var Module = Class.extend({
* argument payload mixed - The payload of the notification.
*/
socketNotificationReceived: function(notification, payload) {
Log.log(this.name + ' received a socket notification: ' + notification + ' - Payload: ' + payload);
Log.log(this.name + " received a socket notification: " + notification + " - Payload: " + payload);
},
/*********************************************
* The methods below don't need subclassing. *
*********************************************/
@@ -131,7 +130,7 @@ var Module = Class.extend({
* It also registers the notification callback.
*/
socket: function() {
if (typeof this._socket === 'undefined') {
if (typeof this._socket === "undefined") {
this._socket = this._socket = new MMSocket(this.name);
}
@@ -151,7 +150,7 @@ var Module = Class.extend({
* return string - File path.
*/
file: function(file) {
return this.data.path + '/' + file;
return this.data.path + "/" + file;
},
/* loadStyles()
@@ -258,16 +257,16 @@ Module.create = function(name) {
//Define the clone method for later use.
function cloneObject(obj) {
if (obj === null || typeof obj !== 'object') {
return obj;
}
if (obj === null || typeof obj !== "object") {
return obj;
}
var temp = obj.constructor(); // give temp the original obj's constructor
for (var key in obj) {
temp[key] = cloneObject(obj[key]);
}
var temp = obj.constructor(); // give temp the original obj's constructor
for (var key in obj) {
temp[key] = cloneObject(obj[key]);
}
return temp;
return temp;
}
var moduleDefinition = Module.definitions[name];
@@ -281,6 +280,6 @@ Module.create = function(name) {
};
Module.register = function(name, moduleDefinition) {
Log.log('Module registered: ' + name);
Log.log("Module registered: " + name);
Module.definitions[name] = moduleDefinition;
};