Skip to content

Commit

Permalink
tls: change var to const
Browse files Browse the repository at this point in the history
PR-URL: #22219
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
  • Loading branch information
oygen87 authored and rvagg committed Aug 13, 2018
1 parent afd3d49 commit 4ad4e37
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/internal/tls.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
// Example:
// C=US\nST=CA\nL=SF\nO=Joyent\nOU=Node.js\nCN=ca1\nemailAddress=ry@clouds.org
function parseCertString(s) {
var out = Object.create(null);
var parts = s.split('\n');
const out = Object.create(null);
const parts = s.split('\n');
for (var i = 0, len = parts.length; i < len; i++) {
var sepIndex = parts[i].indexOf('=');
const sepIndex = parts[i].indexOf('=');
if (sepIndex > 0) {
var key = parts[i].slice(0, sepIndex);
var value = parts[i].slice(sepIndex + 1);
const key = parts[i].slice(0, sepIndex);
const value = parts[i].slice(sepIndex + 1);
if (key in out) {
if (!Array.isArray(out[key])) {
out[key] = [out[key]];
Expand Down

0 comments on commit 4ad4e37

Please sign in to comment.