analyze creditcard number
$ npm install cardnoor
$ bower install cardnovar 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))
// ==> 4111111111111111if 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>MIT © Leigh Zhu