1.0.2 • Published 3 years ago

croib v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

test

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.