Skip to content

Commit 1d6ee8b

Browse files
Driessstargos
authored andcommitted
lib: replace var with let/const
PR-URL: #30409 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
1 parent b540ee0 commit 1d6ee8b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/tls.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ function convertProtocols(protocols) {
109109
return p + 1 + len;
110110
}, 0));
111111

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

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

0 commit comments

Comments
 (0)