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
15 lines (11 loc) • 304 B
text/typescript
export function getSymbolIterator(): symbol {
if (typeof Symbol !== 'function' || !Symbol.iterator) {
return '@@iterator' as any;
}
return Symbol.iterator;
}
export const iterator = getSymbolIterator();
/**
* @deprecated use {@link iterator} instead
*/
export const $$iterator = iterator;