Skip to content
Browse files

Removed use of process.mixin().

  • Loading branch information...
1 parent a8784b6 commit 95467b513366ba71e220528262b376b21b16df98 @scottgonzalez committed
Showing with 21 additions and 7 deletions.
  1. +9 −1 lib/channel.js
  2. +9 −1 lib/server.js
  3. +3 −5 lib/session.js
View
10 lib/channel.js
@@ -13,7 +13,7 @@ function Channel(options) {
this.sessions = {};
}
-process.mixin(Channel.prototype, {
+extend(Channel.prototype, {
appendMessage: function(nick, type, text) {
var message = {
nick: nick,
@@ -104,3 +104,11 @@ process.mixin(Channel.prototype, {
});
exports.Channel = Channel;
+
+
+
+function extend(obj, props) {
+ for (var prop in props) {
+ obj[prop] = props[prop];
+ }
+}
View
10 lib/server.js
@@ -11,7 +11,7 @@ function Server() {
this.channels = [];
}
-process.mixin(Server.prototype, {
+extend(Server.prototype, {
listen: function(port, host) {
this.httpServer.listen(port, host);
},
@@ -153,3 +153,11 @@ Function.prototype.partial = function() {
return fn.apply(this, args.concat(slice.call(arguments)));
};
};
+
+
+
+function extend(obj, props) {
+ for (var prop in props) {
+ obj[prop] = props[prop];
+ }
+}
View
8 lib/session.js
@@ -13,10 +13,8 @@ function Session(nick) {
this.timestamp = new Date();
}
-process.mixin(Session.prototype, {
- poke: function() {
- this.timestamp = new Date();
- }
-});
+Session.prototype.poke = function() {
+ this.timestamp = new Date();
+};
exports.Session = Session;

0 comments on commit 95467b5

Please sign in to comment.
Something went wrong with that request. Please try again.