Skip to content

Croatian Personal identification number validation and generator

License

Notifications You must be signed in to change notification settings

RoccoCocco/croib

Repository files navigation

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.

About

Croatian Personal identification number validation and generator

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages