croib
v1.0.2
Published
Croatian Personal identification number validation and generator
Downloads
16
Maintainers
Readme
Validate & generate Croatian OIB
Simple Typescript utility script for validation of Croatian Personal identification number. Also it can generate valid OIB for testing purposes.
Usage
import { validateOIB, generateRandomOIB } from 'croib';
const randomOib = generateRandomOIB();
const isValid = validateOIB(randomOib);
if (isValid) {
throw new Error('Invalid OIB');
}
Thanks
To @gnekich for the idea. Check his Javscript library oiblib.