Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added emitter-component support

  • Loading branch information...
commit 8acb98996ffb7377977899c1ede4a0e12d176cfc 1 parent 6955d61
@tj tj authored
Showing with 8 additions and 3 deletions.
  1. +7 −3 lib/superagent.js
  2. +1 −0  package.json
View
10 lib/superagent.js
@@ -6,6 +6,10 @@
*/
;(function(){
+
+ var Emitter = 'undefined' == typeof exports
+ ? EventEmitter
+ : require('emitter');
@lwille
lwille added a note

shouldn't this be require('events') ?

#95

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
/**
* Noop.
@@ -378,7 +382,7 @@
function Request(method, url) {
var self = this;
- EventEmitter.call(this);
+ Emitter.call(this);
this.method = method;
this.url = url;
this.header = {};
@@ -389,10 +393,10 @@
}
/**
- * Inherit from `EventEmitter.prototype`.
+ * Inherit from `Emitter.prototype`.
*/
- Request.prototype = new EventEmitter;
+ Request.prototype = new Emitter;
Request.prototype.constructor = Request;
/**
View
1  package.json
@@ -8,6 +8,7 @@
"qs": "0.4.2"
, "formidable": "1.0.9"
, "mime": "1.2.5"
+ , "emitter-component": "0.0.1"
}
, "devDependencies": {
"express": "2.5.x"
Please sign in to comment.
Something went wrong with that request. Please try again.