- Improve pattern recognition for card types
Breaking Changes
- When adding or updating cards, this module no longer uses an
exactPatternandprefixPatternmodel. Instead, it takes an array of patterns. See https://github.com/braintree/credit-card-type#pattern-detection for details.
- Add support for
Elocard type - Adds
updateCardmethod (#77)
- Updates "master-card" enum to "mastercard"
- Add support for
MIRcard type (thanks @antongolub)
- Allow custom card brands to be added
- Correct Mastercard bin range for series 2 bins
- Add support for JCB cards of length 17, 18, and 19 (#54, thanks @zeh)
- Update mastercard niceType property to
Mastercardto match new brand guidelines
Breaking Changes
- Remove internal properties
prefixPatternandexactPatternfrom returned object
- Correct Discover to respect lengths for international cards
- Make Maestro pattern more exact
- Fix prefix pattern for MasterCard numbers starting with
27
- Fix checking for UnionPay ranges
- Visa cards can now be 16, 18, or 19 digits.
- Card matching has been replaced with a two-tier process. This simplifies the matching process for ambiguous numbers.
- Partial BIN matches (
prefixPattern) are accumulated separately from exact BIN matches (exactPattern). - If there were any exact BIN matches, those matches are returned.
- If there are no exact BIN matches, all partial matches are returned.
- Partial BIN matches (
- Add
getTypeInfoandtypesexports for getting type information such as number spacing given a type string such asvisa.
- Remove behavior where some UnionPay cards displayed Discover and UnionPay as possible card types
- Add support for series 2 MasterCard bins (ranging from 222100 to 272099)
- Removes dependency on Lodash
- Switch to one version of Lodash
- Further resolve ambiguity issues with various cards; return an array of potential card types instead of a single type
- Resolve ambiguity issues with Maestro and Discover cards
- Add support for Maestro and UnionPay
- Change return type of
lengthas aStringtolengthsas anArray
- Initial Release