monkey-front-core 0.0.516 → 0.0.517

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -400,15 +400,16 @@ class MonkeyEcxUtils {
400
400
  return !isNaN(date.getTime());
401
401
  };
402
402
  const validateVerificationDigit = (doc) => {
403
+ const digit = doc.slice(-1);
403
404
  const rfc = doc.length === 12 ? ` ${doc}` : doc;
404
405
  const base = rfc.slice(0, -1);
405
406
  const score = getScore(base);
406
407
  const mod = (11000 - score) % 11;
407
408
  if (mod === 11)
408
- return '0';
409
+ return '0' === digit;
409
410
  if (mod === 10)
410
- return 'A';
411
- return String(mod);
411
+ return 'A' === digit;
412
+ return String(mod) === digit;
412
413
  };
413
414
  const isSpecialCase = (doc) => doc in SPECIAL_CASES;
414
415
  const hasForbiddenWords = (doc) => {