isDiscover function

bool isDiscover(
  1. String? value
)

Returns true if the value is a valid Discover card number.

Implementation

bool isDiscover(String? value) {
  if (value == null || value.isEmpty) return false;
  final s = _sanitize(value);
  return _discoverRegex.hasMatch(s) && _passesLuhn(s);
}