New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

credit-card-gaps-pattern

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

credit-card-gaps-pattern

Creates a pattern for restricted-input from data obtained from credit-card-type

  • 0.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

credit-card-gaps-pattern

Creates a pattern for restricted-input from data obtained from credit-card-type

Travis Build StatusAppVeyor Build Statusnodenpm versionDependency StatusXO code styleCoveralls status

npm downloadsnpm

Why ?

Masks on hot for HTMLInputElement

Install

$ npm install credit-card-gaps-pattern 

Note: This project is compatible with node v8+

Usage

// Dependencies
import creditCardGapsPattern from 'credit-card-gaps-pattern';

const gaps = [4, 10];
const lengths = [14, 16, 19];

console.log(creditCardGapsPattern(gaps, lengths));
// => {{9999}} {{999999}} {{999999999}}

Example

// Dependencies
import RestrictedInput from 'restricted-input';
import creditCardType from 'credit-card-type';
import creditCardGapsPattern from 'credit-card-gaps-pattern';

const input = document.querySelector('input');
const {gaps, lengths} = creditCardType('30');

new RestrictedInput({
  element: input,
  pattern: creditCardGapsPattern(gaps, lengths)
});

Demo

  • restricted-input - Allow restricted character sets in input elements.
  • credit-card-type - A library for determining credit card type

Keywords

FAQs

Package last updated on 21 May 2019

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