braintree/credit-card-type
A library for determining credit card type observed · 2026-08-28
Health v2 · maintenance only
74/100
- Activity 90
- Release rhythm 40
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: 0.0
- age_days: 4157
- days_rel: 490
- days_push: 60
- n_releases_24m: 3
Adoption not part of the score
1038 stars · 156 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
A small JavaScript/TypeScript utility library that identifies credit card brand types from full or partial card numbers, supporting type-as-you-go detection. It is not a validation library but a building block for payment forms and validation UIs.
Use cases
- detect credit card type from partial number as user types
- show correct card brand icon in a payment form
- identify card brand from a full card number
- build custom credit card validation logic
- handle ambiguous BIN prefixes like UnionPay vs Discover
- normalize card brand codes for CSS class names
When to choose
- you need lightweight, dependency-free card brand detection in Node or the browser
- you want type-as-you-go detection supporting partial numbers
- you need broad brand coverage including regional cards like Elo, Mir, Troy, Verve
When to avoid
- you need full card number validation (Luhn, expiry, CVV)
- you need payment processing itself rather than card type detection
- you need server-side BIN database lookups with issuer details
Facets
library · maturity stable
parser developer-tools fintech web-development frontend browser cross-platform credit-cards card-detection payments typescript validation-helper nodejs
2 sources
- readme: https://github.com/braintree/credit-card-type · fetched 2026-08-28 · d2841028f91d
- registry_npm: https://registry.npmjs.org/credit-card-type · fetched 2026-08-29 · da9c0848eabf
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| braintree/credit-card-type | main | 74 |
For agents
markdown · JSON · MCP: product_card(name="braintree/credit-card-type")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem