diff --git a/lib/url.js b/lib/url.js index cc098593a5..8314a82427 100644 --- a/lib/url.js +++ b/lib/url.js @@ -76,7 +76,7 @@ function urlParse(url, parseQueryString, slashesDenoteHost) { return u; } -Url.prototype.parse = function(url, parseQueryString, slashesDenoteHost) { +Url.prototype.parse = function parse(url, parseQueryString, slashesDenoteHost) { if (typeof url !== 'string') { throw new TypeError('Parameter "url" must be a string, not ' + typeof url); } @@ -557,7 +557,7 @@ function urlFormat(obj, options) { return obj.format(); } -Url.prototype.format = function() { +Url.prototype.format = function format() { var auth = this.auth || ''; if (auth) { auth = encodeAuth(auth); @@ -642,7 +642,7 @@ function urlResolve(source, relative) { return urlParse(source, false, true).resolve(relative); } -Url.prototype.resolve = function(relative) { +Url.prototype.resolve = function resolve(relative) { return this.resolveObject(urlParse(relative, false, true)).format(); }; @@ -651,7 +651,7 @@ function urlResolveObject(source, relative) { return urlParse(source, false, true).resolveObject(relative); } -Url.prototype.resolveObject = function(relative) { +Url.prototype.resolveObject = function resolveObject(relative) { if (typeof relative === 'string') { var rel = new Url(); rel.parse(relative, false, true); @@ -929,7 +929,7 @@ Url.prototype.resolveObject = function(relative) { return result; }; -Url.prototype.parseHost = function() { +Url.prototype.parseHost = function parseHost() { var host = this.host; var port = portPattern.exec(host); if (port) {