summaryrefslogtreecommitdiff
path: root/lib/url.js
diff options
context:
space:
mode:
authorRuben Bridgewater <ruben@bridgewater.de>2018-12-10 13:27:32 +0100
committerRuben Bridgewater <ruben@bridgewater.de>2018-12-17 17:14:35 +0100
commit50dd555910ed0338c35f27ee57e947b9ec95724c (patch)
tree73a0d59eb5b1087afa4c42bc667bb268f1a23b72 /lib/url.js
parentbe3ae339360c9833a77ebf5772786d75b7a8dd78 (diff)
downloadandroid-node-v8-50dd555910ed0338c35f27ee57e947b9ec95724c.tar.gz
android-node-v8-50dd555910ed0338c35f27ee57e947b9ec95724c.tar.bz2
android-node-v8-50dd555910ed0338c35f27ee57e947b9ec95724c.zip
doc,lib,test: capitalize comment sentences
This activates the eslint capitalize comment rule for comments above 50 characters. PR-URL: https://github.com/nodejs/node/pull/24996 Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'lib/url.js')
-rw-r--r--lib/url.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/url.js b/lib/url.js
index c34eee638c..9755cf430a 100644
--- a/lib/url.js
+++ b/lib/url.js
@@ -78,7 +78,7 @@ const hostPattern = /^\/\/[^@/]+@[^@/]+/;
const simplePathPattern = /^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/;
const hostnameMaxLen = 255;
-// protocols that can allow "unsafe" and "unwise" chars.
+// Protocols that can allow "unsafe" and "unwise" chars.
const unsafeProtocol = new SafeSet([
'javascript',
'javascript:'
@@ -434,7 +434,7 @@ Url.prototype.parse = function parse(url, parseQueryString, slashesDenoteHost) {
this.query = querystring.parse(this.query);
}
} else if (parseQueryString) {
- // no query string, but parseQueryString still requested
+ // No query string, but parseQueryString still requested
this.search = null;
this.query = Object.create(null);
}
@@ -863,7 +863,7 @@ Url.prototype.resolveObject = function resolveObject(relative) {
return result;
}
- // if a url ENDs in . or .., then it must get a trailing slash.
+ // If a url ENDs in . or .., then it must get a trailing slash.
// however, if it ends in anything else non-slashy,
// then it must NOT get a trailing slash.
var last = srcPath.slice(-1)[0];
@@ -871,7 +871,7 @@ Url.prototype.resolveObject = function resolveObject(relative) {
(result.host || relative.host || srcPath.length > 1) &&
(last === '.' || last === '..') || last === '');
- // strip single dots, resolve double dots to parent dir
+ // Strip single dots, resolve double dots to parent dir
// if the path tries to go above the root, `up` ends up > 0
var up = 0;
for (var i = srcPath.length - 1; i >= 0; i--) {