checkdigit
Module to calculate and validate check digits for redundancy checking, using f.ex. mod10 (luhn algorithm) or mod11.
Installation
npm install checkdigit
Usage
var checkdigit = ; checkdigitmod10 // truecheckdigitmod10 // '6'checkdigitmod10 // '2345676' checkdigitmod11 // truecheckdigitmod11 // '5'checkdigitmod11 // '123456785'
Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Run tests using npm test.