Socket
Socket
Sign inDemoInstall

credit-card-gaps-pattern

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

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


Version published
Weekly downloads
1
Maintainers
1
Install size
11.9 kB
Created
Weekly downloads
 

Changelog

Source

<small>0.0.3 (2019-05-21)</small>

  • docs: fix node badges (4242b42)
  • docs: fix user name in dep (84bd0d7)
  • docs: update instance pattern on field (9355bff)
  • build: update depDev (ea56b9c)
  • build: update restricted-input to v2 (203b602)

Readme

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

Keywords

FAQs

Last updated on 21 May 2019

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc