Browse Source

Optimize emit for two arguments

v0.7.4-release
Ryan Dahl 14 years ago
parent
commit
ae8f8e7258
  1. 2
      lib/events.js

2
lib/events.js

@ -21,7 +21,7 @@ process.EventEmitter.prototype.emit = function (type) {
if (!this._events[type]) return false; if (!this._events[type]) return false;
if (typeof this._events[type] == 'function') { if (typeof this._events[type] == 'function') {
if (arguments.length < 3) { if (arguments.length <= 3) {
// fast case // fast case
this._events[type].call( this this._events[type].call( this
, arguments[1] , arguments[1]

Loading…
Cancel
Save