cardno
v0.2.0
Published
analyze creditcard number
Downloads
6
Maintainers
Readme
cardno
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