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

creditable

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

creditable

Utilities for working with credit card form input.


Version published
Weekly downloads
164
decreased by-8.38%
Maintainers
5
Weekly downloads
 
Created

creditable

npm version Build Status Dependency Status

Utilities for working with credit card form input.

CreditableCardType

CreditableCardType( "4123 1234 1234 1234" );
// returns "VISA";

CreditableCardType( "5123 1234 1234 1234" );
// returns "MASTERCARD";

CreditableCardType( "6011 1234 1234 1234" );
// returns "DISCOVER";

CreditableCardType( "3412 123456 12345" );
// returns "AMEX";

CreditableSecurityCode

Update the Security Code placeholder and maxlength based on the card type of the number entered into the Credit Card field. Supports one pair of fields per form. Full demo in index.html.

<form>
	<label>
		Credit Card Number
		<input type="text" data-creditable-creditcard>
	</label>
	<label>
		Security Code
		<input type="text" data-creditable-securitycode>
	</label>
</form>

FAQs

Package last updated on 28 Jun 2017

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