We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent afd3d49 commit 4ad4e37Copy full SHA for 4ad4e37
lib/internal/tls.js
@@ -3,13 +3,13 @@
3
// Example:
4
// C=US\nST=CA\nL=SF\nO=Joyent\nOU=Node.js\nCN=ca1\[email protected]
5
function parseCertString(s) {
6
- var out = Object.create(null);
7
- var parts = s.split('\n');
+ const out = Object.create(null);
+ const parts = s.split('\n');
8
for (var i = 0, len = parts.length; i < len; i++) {
9
- var sepIndex = parts[i].indexOf('=');
+ const sepIndex = parts[i].indexOf('=');
10
if (sepIndex > 0) {
11
- var key = parts[i].slice(0, sepIndex);
12
- var value = parts[i].slice(sepIndex + 1);
+ const key = parts[i].slice(0, sepIndex);
+ const value = parts[i].slice(sepIndex + 1);
13
if (key in out) {
14
if (!Array.isArray(out[key])) {
15
out[key] = [out[key]];
0 commit comments