{"size": 522, "ext": "js", "max_stars_repo_path": "test/lib/mock-res.js", "max_stars_repo_name": "andrewyang96/sse-middleware", "max_stars_repo_stars_event_min_datetime": "2016-08-29T06:55:18.000Z", "max_stars_repo_stars_event_max_datetime": "2017-03-29T21:38:53.000Z", "max_issues_repo_path": "test/lib/mock-res.js", "max_issues_repo_name": "andrewyang96/sse-middleware", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "test/lib/mock-res.js", "max_forks_repo_name": "andrewyang96/sse-middleware", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 2, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 21.75, "max_line_length": 63, "alphanum_fraction": 0.7222222222}
var events = require('events');

function Response() {
  this.statusCode = null;
  this.headers = null;
  this.lastWritten = null;
  this.eventEmitter = new events.EventEmitter();
};

Response.prototype.writeHead = function (statusCode, headers) {
  this.statusCode = statusCode;
  this.headers = headers;
};

Response.prototype.once = function (eventName, callback) {
	this.eventEmitter.once(eventName, callback);
};

Response.prototype.write = function (data) {
  this.lastWritten = data;
};

module.exports = Response;
