0.2.0 • Published 9 years ago

cardno v0.2.0

Weekly downloads
3
License
MIT
Repository
github
Last release
9 years ago

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