cc-validator-node

A tiny module to do credit card number validation based on https://github.com/PawelDecowski/jQuery-CreditCardValidator

npm install cc-validator-node
1 downloads in the last week
3 downloads in the last month

Credit card validation module for Node.js

Based on https://github.com/PawelDecowski/jQuery-CreditCardValidator.

Installation

npm install cc-validator-node

Usage

var ccval = require("cc-validator-node")
    , util = require("util");
...
var validator = new ccval();
validator.validate( number, function(result) {
    if ( result.error ) {
        util.puts("There was an error: " + JSON.stringify(result));
    } else {
        util.puts("Validated: " + JSON.stringify(result));
    }
});

License

Apache License, Version 2.0
http://www.apache.org/licenses/LICENSE-2.0

npm loves you