Skip to content

Commit

Permalink
Remove ternary for code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
navi1995 committed Jul 20, 2020
1 parent 6527124 commit 56da0f6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions index.js
Expand Up @@ -24,10 +24,10 @@ module.exports = async function(inputIDs) {
try {
const response = await fetch(`${URL_PREFIX}${extensionID}`);
const data = await response.text();
const name = data.match(REGEX_NAME)[1] || ''; //For future if multiple ID's?
const installCount = parseInt(data.match(REGEX_INSTALL_COUNT)[1]) || 0;
const ratingCount = parseInt(data.match(REGEX_RATING_COUNT)[1]) || 0;
const ratingValue = parseFloat(data.match(REGEX_RATING_VALUE)[1]) || 0;
const name = data.match(REGEX_NAME)[1];
const installCount = parseInt(data.match(REGEX_INSTALL_COUNT)[1]);
const ratingCount = parseInt(data.match(REGEX_RATING_COUNT)[1]);
const ratingValue = parseFloat(data.match(REGEX_RATING_VALUE)[1]);

responses[extensionID] = createResponse(true, false, name, installCount, ratingCount, ratingValue);

Expand Down

0 comments on commit 56da0f6

Please sign in to comment.