From a285148bfba05166e033d52379bdbb1e55f3d5e4 Mon Sep 17 00:00:00 2001 From: Pedro lima Date: Fri, 21 Oct 2016 18:57:24 +0000 Subject: [PATCH] url: name anonymous functions in url name anonymous functions in url module the changes are related to commits ef030da and accf410 which are naming anonymous functions to standardize the code and help debugging, also with Ref: #8913 --- lib/url.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/url.js b/lib/url.js index 201ebfedcc5cda..a7988f2ce4ab0a 100644 --- a/lib/url.js +++ b/lib/url.js @@ -86,7 +86,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); } @@ -555,7 +555,7 @@ function urlFormat(obj) { return obj.format(); } -Url.prototype.format = function() { +Url.prototype.format = function format() { var auth = this.auth || ''; if (auth) { auth = encodeAuth(auth); @@ -640,7 +640,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(); }; @@ -649,7 +649,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); @@ -927,7 +927,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) {