view/frontend/web/js/vanillamasker.min.js
Function toMoney
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
(i.toMoney = function(a, b) {
if (((b = f(b)), b.zeroCents)) {
b.lastOutput = b.lastOutput || '';
var c = '(' + b.separator + '[0]{0,' + b.precision + '})',
d = new RegExp(c, 'g'),
Consider simplifying this complex logical expression. Open
Open
if (
(j[f] === a && k[m].match(/[0-9]/)) ||
(j[f] === b && k[m].match(/[a-zA-Z]/)) ||
(j[f] === c && k[m].match(/[0-9a-zA-Z]/))
)