Gathering detailed insights and metrics for creditcards-types-fabricio
Gathering detailed insights and metrics for creditcards-types-fabricio
Gathering detailed insights and metrics for creditcards-types-fabricio
Gathering detailed insights and metrics for creditcards-types-fabricio
npm install creditcards-types-fabricio
Typescript
Module System
Node Version
NPM Version
68
Supply Chain
99.2
Quality
74.8
Maintenance
100
Vulnerability
100
License
JavaScript (95.87%)
TypeScript (4.13%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
72 Stars
143 Commits
20 Forks
3 Watchers
6 Branches
12 Contributors
Updated on May 28, 2025
Latest Version
1.6.2
Package Id
creditcards-types-fabricio@1.6.2
Size
3.31 kB
NPM Version
5.5.1
Node Version
8.9.1
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
Card type definitions and methods used by creditcards, a JS library for all platforms for parsing, validating, and formatting credit card data.
Visa Electron cards will validate and match as regular Visa cards.
Open an issue if you need a type that's missing.
1npm install creditcards-types
1var types = require('creditcards-types').types 2var visa = types.visa 3visa.test('4242424242424242') // true
find(callback)
-> type
/ undefined
Iterates through the available types until the callback
returns a truthy value. Returns the first matching type. Iteration order is undefined.
Required
Type: function
Callback that is called with card type objects and should return truthy/falsy until a match is found.
new Type(config)
-> type
Creates a new card type.
1var Type = require('creditcards-types').Type 2var type = new Type(config)
Required
Type: object
The type configuration, containing the following properties:
pattern
true
regexp
eagerPattern
true
regexp
groupPattern
regexp
/(\d{1,4})(\d{1,4})?(\d{1,4})?(\d{1,4})?/
cvcLength
number
3
luhn
boolean
true
type.test(number, [eager])
-> boolean
Check whether a card number matches the type.
Required
Type: string
The card number to test.
Type: Boolean
Default: false
When false
, the full card pattern is used. When true
, the eager pattern is tested instead.
1var types = require('creditcards-types').types; 2var visa = types.visa; 3 4// Strict type validation 5visa.test('4242424242424242'); // => true 6 7// Eager type checking 8visa.test('42', true); // => true
type.group(number)
-> array[string]
Separates the card number into formatting groups.
Required
Type: string
The card number to group. This may be a complete or partial card number. Any digits past the type's maximum length will be discarded.
MIT © Ben Drucker
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 5/14 approved changesets -- score normalized to 3
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
security policy file not detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-14
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More