summaryrefslogtreecommitdiff
path: root/lib/url.js
diff options
context:
space:
mode:
authorRuben Bridgewater <ruben@bridgewater.de>2019-01-21 01:22:27 +0100
committerRuben Bridgewater <ruben@bridgewater.de>2019-02-28 18:31:10 +0100
commit9edce1e12a7b69e7986dd15fce18d6e46590161a (patch)
treec5d37d8016a27bab698520ecc51cda4f7ad99d40 /lib/url.js
parent7b674697d8005c29391ebaaf562eb4d92ed9b129 (diff)
downloadandroid-node-v8-9edce1e12a7b69e7986dd15fce18d6e46590161a.tar.gz
android-node-v8-9edce1e12a7b69e7986dd15fce18d6e46590161a.tar.bz2
android-node-v8-9edce1e12a7b69e7986dd15fce18d6e46590161a.zip
benchmark,doc,lib,test: capitalize comments
This updates a lot of comments. PR-URL: https://github.com/nodejs/node/pull/26223 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Diffstat (limited to 'lib/url.js')
-rw-r--r--lib/url.js18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/url.js b/lib/url.js
index 0e02dbc131..78dcbe7130 100644
--- a/lib/url.js
+++ b/lib/url.js
@@ -345,14 +345,14 @@ Url.prototype.parse = function parse(url, parseQueryString, slashesDenoteHost) {
// pull out port.
this.parseHost();
- // we've indicated that there is a hostname,
+ // We've indicated that there is a hostname,
// so even if it's empty, it has to be present.
if (typeof this.hostname !== 'string')
this.hostname = '';
var hostname = this.hostname;
- // if hostname begins with [ and ends with ]
+ // If hostname begins with [ and ends with ]
// assume that it's an IPv6 address.
var ipv6Hostname = hostname.charCodeAt(0) === CHAR_LEFT_SQUARE_BRACKET &&
hostname.charCodeAt(hostname.length - 1) === CHAR_RIGHT_SQUARE_BRACKET;
@@ -527,9 +527,9 @@ function autoEscapeStr(rest) {
return escaped;
}
-// format a parsed object into a url string
+// Format a parsed object into a url string
function urlFormat(urlObject, options) {
- // ensure it's an object, and not a string url.
+ // Ensure it's an object, and not a string url.
// If it's an object, this is a no-op.
// this way, you can call urlParse() on strings
// to clean up potentially wonky urls.
@@ -678,7 +678,7 @@ Url.prototype.resolveObject = function resolveObject(relative) {
result[tkey] = this[tkey];
}
- // hash is always overridden, no matter what.
+ // Hash is always overridden, no matter what.
// even href="" will remove it.
result.hash = relative.hash;
@@ -688,9 +688,9 @@ Url.prototype.resolveObject = function resolveObject(relative) {
return result;
}
- // hrefs like //foo/bar always cut to the protocol.
+ // Hrefs like //foo/bar always cut to the protocol.
if (relative.slashes && !relative.protocol) {
- // take everything except the protocol from relative
+ // Take everything except the protocol from relative
var rkeys = Object.keys(relative);
for (var rk = 0; rk < rkeys.length; rk++) {
var rkey = rkeys[rk];
@@ -709,7 +709,7 @@ Url.prototype.resolveObject = function resolveObject(relative) {
}
if (relative.protocol && relative.protocol !== result.protocol) {
- // if it's a known url protocol, then changing
+ // If it's a known url protocol, then changing
// the protocol does weird things
// first, if it's not file:, then we MUST have a host,
// and if there was a path
@@ -770,7 +770,7 @@ Url.prototype.resolveObject = function resolveObject(relative) {
var noLeadingSlashes = result.protocol &&
!slashedProtocol.has(result.protocol);
- // if the url is a non-slashed url, then relative
+ // If the url is a non-slashed url, then relative
// links like ../.. should be able
// to crawl up to the hostname, as well. This is strange.
// result.protocol has already been set by now.