Skip to content

Commit

Permalink
misc refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Oct 7, 2011
1 parent 8848004 commit 4ed92d5
Showing 1 changed file with 2 additions and 24 deletions.
26 changes: 2 additions & 24 deletions lib/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,19 +84,8 @@ app.defaultConfiguration = function(){
// always parse req.query
this.use(connect.query());

/**
* Assign several locals with the given `obj`,
* or return the locals.
*
* @param {Object} obj
* @return {Object|HTTPServer}
* @api public
*/

this.locals = function(obj){
for (var key in obj) {
self.locals[key] = obj[key];
}
for (var key in obj) self.locals[key] = obj[key];
return self;
};

Expand All @@ -112,19 +101,8 @@ app.defaultConfiguration = function(){
// charset
if (charset = self.set('charset')) res.charset = charset;

/**
* Assign several locals with the given `obj`,
* or return the locals.
*
* @param {Object} obj
* @return {Object|ServerResponse}
* @api public
*/

res.locals = function(obj){
for (var key in obj) {
res.locals[key] = obj[key];
}
for (var key in obj) res.locals[key] = obj[key];
return res;
};

Expand Down

0 comments on commit 4ed92d5

Please sign in to comment.