Credit card number validator for Node.js
JavaScript
Latest commit ded55a0 Mar 20, 2012 @radekg First implementation
Permalink
Failed to load latest commit information.
lib/cc-validator-node
test
.gitignore
README.md
package.json

README.md

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