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

@@ -11,22 +11,21 @@ var MMSocket = function(moduleName) {
var self = this;
if (typeof moduleName !== 'string') {
throw new Error('Please set the module name for the MMSocket.');
if (typeof moduleName !== "string") {
throw new Error("Please set the module name for the MMSocket.");
}
self.moduleName = moduleName;
self.socket = io('http://localhost:8080');
self.socket.on('notification', function (data) {
self.socket = io("http://localhost:8080");
self.socket.on("notification", function(data) {
MM.sendNotification(data.notification, data.payload, Socket);
});
return {
sendMessage: function(notification, payload, sender) {
Log.log('Send socket message: ' + notification);
self.socket.emit('notification', {
Log.log("Send socket message: " + notification);
self.socket.emit("notification", {
notification: notification,
sender: sender,
payload: payload