Skip to content

Commit

Permalink
prettier --write '**/*.js'
Browse files Browse the repository at this point in the history
  • Loading branch information
papandreou committed Jul 21, 2019
1 parent 0c149b7 commit 251248f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/expressExtendCsp.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function toCamelCase(str) {

function fromCamelCase(str) {
return str.replace(/[A-Z]/g, function($0) {
return `-${ $0.toLowerCase()}`;
return `-${$0.toLowerCase()}`;
});
}

Expand Down Expand Up @@ -62,7 +62,7 @@ function serializeCsp(parsedCsp) {
Object.keys(parsedCsp).forEach(directiveName => {
text += (text ? '; ' : '') + fromCamelCase(directiveName);
if (parsedCsp[directiveName].length > 0) {
text += ` ${ parsedCsp[directiveName].join(' ')}`;
text += ` ${parsedCsp[directiveName].join(' ')}`;
}
});
return text;
Expand Down

0 comments on commit 251248f

Please sign in to comment.