Fix Pan.mjs: operator-linebreak for cardTypeNote ternary
This commit is contained in:
parent
e08d401956
commit
718824a42f
@ -222,9 +222,9 @@ function parsePan(pan) {
|
|||||||
network: brand || "Unknown",
|
network: brand || "Unknown",
|
||||||
cardType: typeHint ? typeHint.likelyType : "Unknown",
|
cardType: typeHint ? typeHint.likelyType : "Unknown",
|
||||||
cardTypeConfidence: typeHint ? typeHint.confidence : "low",
|
cardTypeConfidence: typeHint ? typeHint.confidence : "low",
|
||||||
cardTypeNote: typeHint
|
cardTypeNote: typeHint ?
|
||||||
? typeHint.note
|
typeHint.note :
|
||||||
: "Card type cannot be determined — the PAN did not match a known network range.",
|
"Card type cannot be determined — the PAN did not match a known network range.",
|
||||||
majorIndustryIdentifier: mii,
|
majorIndustryIdentifier: mii,
|
||||||
majorIndustryIdentifierDescription: MII_DESCRIPTIONS[mii] || "Unknown",
|
majorIndustryIdentifierDescription: MII_DESCRIPTIONS[mii] || "Unknown",
|
||||||
issuerIdentificationNumber: normalized.substring(0, Math.min(8, normalized.length)),
|
issuerIdentificationNumber: normalized.substring(0, Math.min(8, normalized.length)),
|
||||||
@ -336,5 +336,4 @@ export {
|
|||||||
generateTestPan,
|
generateTestPan,
|
||||||
isLuhnValid,
|
isLuhnValid,
|
||||||
parsePan,
|
parsePan,
|
||||||
};
|
};
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user