OIB is Osobni identifikacijski broj (eng. Personal identification number); a uniq numerical identificator of companies and people in Republic of Croatia. It's in use since 2009.
Install it with npm:
npm install --save oib.js
And use it like:
const oib = require('oib.js');
oib.validate('24076340234');
Or include it in your HTML (1995 style):
<script src="https://unpkg.com/oib.js"></script>
And use it like:
oib.validate('24076340234');
This will validate against the full specification of the standard. It accepts both string
and number
. It returns true
or false
.
oib.validate('24076340234');
oib.validate(24076340234);
This validates only against ISO 7064 standard (it just exposes the ISO 7064 algorithm). It accepts both string
and number
. It returns true
or false
.
oib.iso7064('24076340234');
oib.iso7064(24076340234);
Andrei Zvonimir Crnkovic [email protected] MIT 2016.