Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

credit-card-regex

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

credit-card-regex

Regular expression for matching credit card numbers

  • 1.1.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

credit-card-regex Build Status

Regular expression for matching credit card numbers

Install

$ npm install --save credit-card-regex

Usage

var creditCardRegex = require('credit-card-regex');

creditCardRegex().test('6011881485017922');
//=> true

creditCardRegex().exec('Credit card number: 6011881485017922')[0].trim();
//=> 6011881485017922

'Multiple 5441068611005540 6011881485017922 numbers'.match(creditCardRegex());
//=> ['5441068611005540', '6011881485017922']

License

MIT © Kevin Mårtensson

Keywords

FAQs

Package last updated on 22 Nov 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc