v2.0.0
New features
- New object oriented API:
import { NorwegianId } from 'norwegian-national-id-validator'; const validation = NorwegianId('29029600013'); validation.isValid() // => true validation.isBirthNumber() // => true validation.isDNumber() // => false validation.isHNumber() // => false validation.isFhNumber() // => false validation.isMale() // => false validation.isFemale() // => true validation.age() // => 24
Breaking
- The previously undocumented function
idNumberType
returnedtype IdNumberType
before, but this is changed toenum IdNumberType
.
Documentation
A massive documentation upgrade, including automatically generated API documentation: https://github.com/mikaello/norwegian-national-id-validator/tree/master/docs
Thanks to @cobraz !