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

16 lines (13 loc) 320 B
'use strict'; const isPromise = input => ( input instanceof Promise || ( input !== null && typeof input === 'object' && typeof input.then === 'function' && typeof input.catch === 'function' ) ); module.exports = isPromise; // TODO: Remove this for the next major release module.exports.default = isPromise;