Added normalisation format option. Types our now mostly enums. Removed forgiving logic around if age > 120. Strict and forgiving are now default true.
UTC fixes
Rewrite to TypeScript. Change of license to MIT.
A lot of API breaking changes. Constants such as gender
, errors
, and personal number types
are now caps, ex. male
=> MALE
.
- Added type to personnummer.validate(). It can either be
personnummer
orsamordningsnummer
. - Removed optimised
validate
andnormalise
functions since benchmarking showed little to no difference. - Added
parseCIN
,normaliseCIN
, andvalidateCIN
. - Updated
README
to account for updates.
Added some additional keywords to package.json and cleaned README.md