Permalink
Browse files

Update lib/method.js

  • Loading branch information...
1 parent fbb6b7c commit 99c1039aa737e6f1fde40894905ea07b4a921df2 @iwillwen committed Dec 1, 2012
Showing with 5 additions and 12 deletions.
  1. +5 −12 lib/method.js
View
@@ -8,21 +8,13 @@ var https = require('https');
var http = require('http');
var dataStream = require('dataStream');
var eventproxy = require('eventproxy').EventProxy;
-<<<<<<< HEAD
-var asynclist = require('asynclist');
-=======
->>>>>>> 33201c1a7bddcdf11d2891678ab2f9d1a0dfc163
var url = require('url');
var utils = require('./utils');
var middlewares = ['basicAuth', 'bodyParser', 'cookieParser', 'cookieSession', 'csrf', 'directory', 'errorHandler', 'favicon', 'json', 'limit', 'logger', 'methodOverride', 'multipart', 'query', 'responseTime', 'session', 'staticCache', 'urlencoded', 'vhost'];
function method (web) {
//Method
-<<<<<<< HEAD
- web.version = '0.5.9';
-=======
- web.version = '0.5.8';
->>>>>>> 33201c1a7bddcdf11d2891678ab2f9d1a0dfc163
+ web.version = '0.6.0';
/**
* return a middlewaves collection iterator.
@@ -351,7 +343,7 @@ function method (web) {
* @param {String} mime MIME类型*
*/
web.extend = function (file) {
- if (arguments.length = 1)
+ if (arguments.length == 1) {
switch (typeof file) {
case "string":
var extend = require(file);
@@ -365,7 +357,7 @@ function method (web) {
file(this);
break;
}
- else
+ } else {
for (var i = 0; i < arguments.length; i++) {
switch (typeof arguments[i]) {
case "string":
@@ -380,7 +372,8 @@ function method (web) {
arguments[i](this);
break;
}
- };
+ }
+ }
return this;
};

0 comments on commit 99c1039

Please sign in to comment.