cardno

0.2.0 • Public • Published

cardno

NPM version

analyze creditcard number


Installation

$ npm install cardno

or

$ bower install cardno

Example

var cardno = require('cardno');
 
var no = '4111111111111111';
 
no2 = '4111-1111-1111-1111';
 
console.log(cardno.validate(no));
// ==> true
 
console.log(cardno.is(no))
// ==> Visa
 
console.log(cardno.normalize(no2))
// ==> 4111111111111111

if you want to use this in browsers, you may need reference the lib to your html

<script src="/path/to/cardno/lib/cardno.js"></script>

License

MIT © Leigh Zhu

Package Sidebar

Install

npm i cardno

Weekly Downloads

2

Version

0.2.0

License

MIT

Last publish

Collaborators

  • lisposter