summaryrefslogtreecommitdiff
path: root/lib/url.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/url.js')
-rw-r--r--lib/url.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/url.js b/lib/url.js
index 78dcbe7130..391d6c2723 100644
--- a/lib/url.js
+++ b/lib/url.js
@@ -80,12 +80,12 @@ const unsafeProtocol = new SafeSet([
'javascript',
'javascript:'
]);
-// protocols that never have a hostname.
+// Protocols that never have a hostname.
const hostlessProtocol = new SafeSet([
'javascript',
'javascript:'
]);
-// protocols that always contain a // bit.
+// Protocols that always contain a // bit.
const slashedProtocol = new SafeSet([
'http',
'http:',
@@ -367,7 +367,7 @@ Url.prototype.parse = function parse(url, parseQueryString, slashesDenoteHost) {
if (this.hostname.length > hostnameMaxLen) {
this.hostname = '';
} else {
- // hostnames are always lower case.
+ // Hostnames are always lower case.
this.hostname = this.hostname.toLowerCase();
}
@@ -396,8 +396,8 @@ Url.prototype.parse = function parse(url, parseQueryString, slashesDenoteHost) {
}
}
- // now rest is set to the post-host stuff.
- // chop off any delim chars.
+ // Now rest is set to the post-host stuff.
+ // Chop off any delim chars.
if (!unsafeProtocol.has(lowerProto)) {
// First, make 100% sure that any "autoEscape" chars get
// escaped, even if encodeURIComponent doesn't think they
@@ -810,7 +810,7 @@ Url.prototype.resolveObject = function resolveObject(relative) {
result.search = relative.search;
result.query = relative.query;
srcPath = relPath;
- // fall through to the dot-handling below.
+ // Fall through to the dot-handling below.
} else if (relPath.length) {
// it's relative
// throw away the existing file, and take the new path instead.