_validateCheckDigit(cardNumber) {

				// From https://stackoverflow.com/questions/12310837/implementation-of-luhn-algorithm
				var nCheck = 0,
					bEven = false,
					value = cardNumber.replace(/\D/g, "");

				for (var n = value.length - 1; n >= 0; n--) {
					var cDigit = value.charAt(n),
						nDigit = parseInt(cDigit, 10);
					if (bEven) {
						if ((nDigit *= 2) > 9) nDigit -= 9;
					}
					nCheck += nDigit;
					bEven = !bEven;
				}

				return (nCheck % 10) === 0;
			}
/**
			 * PRIVATE. Validates card number check digit
			 *
			 * @param {string} cardNumber Card number to check
			 */
PRIVATE. Validates card number check digit
@param {string} cardNumber Card number to check
PRIVATE . Validates card number check digit @param { string } cardNumber Card number to check
_validateCheckDigit(cardNumber) {
				var nCheck = 0,
					bEven = false,
					value = cardNumber.replace(/\D/g, "");
				for (var n = value.length - 1; n >= 0; n--) {
					var cDigit = value.charAt(n),
						nDigit = parseInt(cDigit, 10);
					if (bEven) {
						if ((nDigit *= 2) > 9) nDigit -= 9;
					}
					nCheck += nDigit;
					bEven = !bEven;
				}
				return (nCheck % 10) === 0;
			}
_validateCheckDigit ( cardNumber ) { var nCheck = 0 , bEven = false , value = cardNumber . replace ( / \D / g , "" ) ; for ( var n = value . length - 1 ; n >= 0 ; n -- ) { var cDigit = value . charAt ( n ) , nDigit = parseInt ( cDigit , 10 ) ; if ( bEven ) { if ( ( nDigit *= 2 ) > 9 ) nDigit -= 9 ; } nCheck += nDigit ; bEven = ! bEven ; } return ( nCheck % 10 ) === 0 ; }
PRIVATE.
PRIVATE .
// From https://stackoverflow.com/questions/12310837/implementation-of-luhn-algorithm