luhn-generator
Version:
A generator of numbers that passes the validation of Luhn algorithm or Luhn formula, also known as the 'modulus 10' or 'mod 10' algorithm
12 lines (9 loc) • 358 B
JavaScript
;
var hasSymbols = require('has-symbols')();
var regexpMatchAll = require('./regexp-matchall');
module.exports = function getRegExpMatchAllPolyfill() {
if (!hasSymbols || typeof Symbol.matchAll !== 'symbol' || typeof RegExp.prototype[Symbol.matchAll] !== 'function') {
return regexpMatchAll;
}
return RegExp.prototype[Symbol.matchAll];
};