Closed Ridermansb closed 6 years ago
You have an empty prefixPattern
in the snippet. When I added one lorem ip
was no longer detected as hipercard
.
const creditCardType = require("credit-card-type");
creditCardType.addCard({
niceType: "Hipercard",
type: "hipercard",
exactPattern: /^(606282\d{10}(\d{3})?)|(3841\d{15})$/,
prefixPattern: /^(6|3)/,
gaps: [4, 8, 12],
lengths: [16, 19],
code: { name: "CVC", size: 3 }
});
const [cardDetected] = creditCardType("lorem ip");
console.log(cardDetected); // undefined
General information
Issue description
I added custom brand... (Hipercard) but is resolving any random data as Hipercard...