croib
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

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.

Package Sidebar

Install

npm i croib

Weekly Downloads

3

Version

1.0.2

License

MIT

Unpacked Size

2.8 kB

Total Files

3

Last publish

Collaborators

  • roccococco