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

17 lines (14 loc) 372 B
'use strict'; const getPolyfill = require('./polyfill'); module.exports = () => { const polyfill = getPolyfill(); if (polyfill !== process.allowedNodeEnvironmentFlags) { Object.defineProperty(process, 'allowedNodeEnvironmentFlags', { writable: true, enumerable: true, configurable: true, value: polyfill }); } return polyfill; };