Security fixes (#32)
* Generic Object Injection Sink * (fix) "Character" is not defined. * added eslint * improve code quality, use refactored function * (fix) eslint jest * "Character" is not defined * removed unused file Compare.js * (fix) PointsUsed is not defined * (fix) eslint moans jsconfig * turn off "no-prototype-builtins" * push code coverage
This commit is contained in:
@ -1,15 +1,9 @@
|
||||
const CalculateQuality = (PointsAvailable = 0) => {
|
||||
if (PointsAvailable <= 3)
|
||||
return 1;
|
||||
else if (PointsAvailable > 3 && PointsAvailable <= 6)
|
||||
return 2;
|
||||
else if (PointsAvailable > 6 && PointsAvailable <= 9)
|
||||
return 3;
|
||||
else if (PointsAvailable > 9 && PointsAvailable <= 12)
|
||||
return 4;
|
||||
else if (PointsAvailable > 12 && PointsAvailable <= 15)
|
||||
return 5;
|
||||
else if (PointsAvailable > 15)
|
||||
return 6;
|
||||
if (PointsAvailable <= 3) return 1;
|
||||
else if (PointsAvailable > 3 && PointsAvailable <= 6) return 2;
|
||||
else if (PointsAvailable > 6 && PointsAvailable <= 9) return 3;
|
||||
else if (PointsAvailable > 9 && PointsAvailable <= 12) return 4;
|
||||
else if (PointsAvailable > 12 && PointsAvailable <= 15) return 5;
|
||||
else return 6;
|
||||
};
|
||||
module.exports = { CalculateQuality };
|
||||
|
Reference in New Issue
Block a user