replace non-word chars with -

This commit is contained in:
AJ ONeal 2014-06-17 20:05:45 -06:00
parent 1b4da6d9a0
commit 6f0833e1f4
1 changed files with 2 additions and 2 deletions

View File

@ -115,9 +115,9 @@ function parseCertData(lines) {
} }
function dumpCerts(certs, filename, pemsDir) { function dumpCerts(certs, filename, pemsDir) {
certs.forEach(function (cert, i) { certs.forEach(function (cert) {
var pem = cert.quasiPEM() 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') , pemsFile = path.join(pemsDir, pemName + '.pem')
; ;