From 6f0833e1f484696479bcd42cc8afb92d277b93be Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Tue, 17 Jun 2014 20:05:45 -0600 Subject: [PATCH] replace non-word chars with - --- ca-store-generator.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ca-store-generator.js b/ca-store-generator.js index 86f8e93..836753d 100644 --- a/ca-store-generator.js +++ b/ca-store-generator.js @@ -115,9 +115,9 @@ function parseCertData(lines) { } function dumpCerts(certs, filename, pemsDir) { - certs.forEach(function (cert, i) { + certs.forEach(function (cert) { var pem = cert.quasiPEM() - , pemName = pem.name.toLowerCase().replace(/\W/, '-').replace(/-+/, '-') + , pemName = pem.name.toLowerCase().replace(/\W/g, '-').replace(/-+/g, '-') , pemsFile = path.join(pemsDir, pemName + '.pem') ;