Skip to content

Commit

Permalink
lib: replace var with let/const
Browse files Browse the repository at this point in the history
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 gireeshpunathil committed Nov 24, 2019
1 parent 1d2c8b4 commit 26b2655
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/tls.js
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 26b2655

Please sign in to comment.