Skip to content

Commit

Permalink
fixing trailing comma
Browse files Browse the repository at this point in the history
  • Loading branch information
ericz committed Apr 7, 2011
1 parent 4d71a28 commit 3c50c95
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions lib/now.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,14 @@ var nowCore = {

_events: {},

// Event code frrom socket.io
on: function(name, fn){
if (!(name in nowCore._events)) nowCore._events[name] = [];
nowCore._events[name].push(fn);
return nowCore;
},
// Event code frro socket.io
on: function(name, fn){
if (!(name in nowCore._events)) {
nowCore._events[name] = [];
}
nowCore._events[name].push(fn);
return nowCore;
},

emit: function(name, args){
if (name in nowCore._events){
Expand All @@ -155,17 +157,17 @@ var nowCore = {
}
return nowCore;
},

removeEvent: function(name, fn){
if (name in nowCore._events){
for (var a = 0, l = nowCore._events[name].length; a < l; a++) {
if (nowCore._events[name][a] == fn) {
removeEvent: function(name, fn){
if (name in nowCore._events){
for (var a = 0, l = nowCore._events[name].length; a < l; a++) {
if (nowCore._events[name][a] == fn) {
nowCore._events[name].splice(a, 1);
}
}
}
return nowCore;
},
}
return nowCore;
}
};

var nowLib = {
Expand Down

0 comments on commit 3c50c95

Please sign in to comment.