Module for making and verifying KID numbers
npm install kid-util
Development moved to NPM package norwegian-numbers: GitHub npm
Simple utils to generate and verify KID numbers with either MOD10 or MOD11.
To install from NPM as a package in your environment:
npm install kid-util
Example code usages after installation:
> const kid = require('kid-util');
undefined
> kid.make('1234');
'12344'
> kid.make('1234', 'MOD11');
'12343'
> kid.verify('12344');
true
> kid.verify('12343', 'MOD11');
true
To run the tests:
mocha
Or:
npm test
The distribution was created by the following commands:
npm publish --access public
This repo is a JavaScript port of my Python kid-util repo.