UNPKG

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

8 lines (6 loc) 244 B
var IS_PURE = require('../internals/is-pure'); var getIterator = require('../internals/get-iterator'); module.exports = IS_PURE ? getIterator : function (it) { // eslint-disable-next-line no-undef return Map.prototype.entries.call(it); };