Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

url: name anonymous functions in url #9225

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions lib/url.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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();
};

Expand All @@ -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);
Expand Down Expand Up @@ -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) {
Expand Down