diff --git a/server.js b/server.js index 3bfc8557550ac..accf7a7d14fa4 100644 --- a/server.js +++ b/server.js @@ -1687,10 +1687,10 @@ cache(function(data, match, sendBadge, request) { // CDNJS version integration camp.route(/^\/cdnjs\/v\/(.*)\.(svg|png|gif|jpg|json)$/, cache(function(data, match, sendBadge, request) { - var library = encodeURIComponent(match[1]); // eg, "express" or "@user/express" - var format = match[2]; - var apiUrl = 'https://api.cdnjs.com/libraries/' + library + '?fields=version'; - var badgeData = getBadgeData('cdnjs', data); + const library = encodeURIComponent(match[1]); // eg, "express" or "@user/express" + const format = match[2]; + const apiUrl = 'https://api.cdnjs.com/libraries/' + library + '?fields=version'; + const badgeData = getBadgeData('cdnjs', data); request(apiUrl, function(err, res, buffer) { if (err != null) { badgeData.text[1] = 'inaccessible';