Skip to content
Permalink
Browse files

lib: replace var with let/const

PR-URL: #30409
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
  • Loading branch information
Driesss authored and MylesBorins committed Nov 12, 2019
1 parent 7eafe8a commit 03e6d0d4086b2cd56793fee1c72505708e25fc58
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/tls.js
@@ -109,8 +109,8 @@ function convertProtocols(protocols) {
return p + 1 + len;
}, 0));

var offset = 0;
for (var i = 0, c = protocols.length; i < c; i++) {
let offset = 0;
for (let i = 0, c = protocols.length; i < c; i++) {
buff[offset++] = lens[i];
buff.write(protocols[i], offset);
offset += lens[i];
@@ -163,7 +163,7 @@ function check(hostParts, pattern, wildcards) {
return false;

// Check host parts from right to left first.
for (var i = hostParts.length - 1; i > 0; i -= 1) {
for (let i = hostParts.length - 1; i > 0; i -= 1) {
if (hostParts[i] !== patternParts[i])
return false;
}

0 comments on commit 03e6d0d

Please sign in to comment.
You can’t perform that action at this time.