403Webshell
Server IP : 162.0.232.140  /  Your IP : 3.148.226.67
Web Server : LiteSpeed
System : Linux premium139.web-hosting.com 4.18.0-513.24.1.lve.2.el8.x86_64 #1 SMP Fri May 24 12:42:50 UTC 2024 x86_64
User : micrcvoy ( 740)
PHP Version : 8.1.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/micrcvoy/public_html/controlPanel/assets/plugins/parsleyjs/src/extra/validator/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/micrcvoy/public_html/controlPanel/assets/plugins/parsleyjs/src/extra/validator/luhn.js
// luhn extra validators
window.ParsleyConfig = window.ParsleyConfig || {};
window.ParsleyConfig.validators = window.ParsleyConfig.validators || {};

window.ParsleyConfig.validators.luhn = {
  fn: function (value) {
    value = value.replace(/[ -]/g, '');
    var digit, n, sum, _j, _len1, _ref2;
    sum = 0;
    _ref2 = value.split('').reverse();
    for (n = _j = 0, _len1 = _ref2.length; _j < _len1; n = ++_j) {
      digit = _ref2[n];
      digit = +digit;
      if (n % 2) {
        digit *= 2;
        if (digit < 10) {
          sum += digit;
        } else {
          sum += digit - 9;
        }
      } else {
        sum += digit;
      }
    }
    return sum % 10 === 0;
  },
  priority: 32
};

Youez - 2016 - github.com/yon3zu
LinuXploit