This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Variant of Avraham Plotnitzky's String.prototype method mixed with the "fast" version | |
* see: https://sites.google.com/site/abapexamples/javascript/luhn-validation | |
* @author ShirtlessKirk. Copyright (c) 2012. | |
* Licensed under WTFPL (http://www.wtfpl.net/txt/copying) | |
*/ | |
function luhnChk(luhn) { | |
var len = luhn.length, | |
mul = 0, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Variant of Avraham Plotnitzky's String.prototype method mixed with the "fast" version | |
* see: https://sites.google.com/site/abapexamples/javascript/luhn-validation | |
* @author ShirtlessKirk. Copyright (c) 2012. | |
* Licensed under WTFPL (http://www.wtfpl.net/txt/copying) | |
*/ | |
function luhnChk(luhn) { | |
var len = luhn.length, | |
mul = 0, |