Validate Norwegian national identity numbers
MIT License
Bot releases are hidden (Show)
Upgrade dev dependencies.
See all changes here https://github.com/mikaello/norwegian-national-id-validator/compare/v3.1.0...v3.1.1
Published by mikaello over 2 years ago
Expose birth date in object oriented API: https://github.com/mikaello/norwegian-national-id-validator/pull/44
Published by mikaello about 4 years ago
No API-changes, but important bug fix of D-number validation. Some D-numbers that previously validated does not now, and some that previously did not validate do now (see also https://github.com/mikaello/norwegian-national-id-validator/issues/30#issuecomment-677903987). Thats the reason for new major version.
The actual fix was this commit: https://github.com/mikaello/norwegian-national-id-validator/commit/7e4f15310969793ad59ef48b87cc7a4bb1fc8108#diff-f41e9d04a45c83f3b6f6e630f10117fe
See Forskrift til folkeregisterloven
, paragraph § 2-2-2 for more details on D-number.
Published by mikaello over 4 years ago
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
idNumberType
returned type IdNumberType
before, but this is changed to enum IdNumberType
.A massive documentation upgrade, including automatically generated API documentation: https://github.com/mikaello/norwegian-national-id-validator/tree/master/docs
Thanks to @cobraz !
Published by mikaello over 4 years ago
Upgrade dev dependencies (security update of acorn)
Published by mikaello over 4 years ago
Upgrade dev dependencies (jest/typescript)
Published by mikaello almost 5 years ago
Fix for users with non expected timezone (#18)
Published by mikaello about 5 years ago
TypeScript-types and Flow-types are now bundled with the NPM-release (those files were previously ignored by a mistake with a misconfigured .npmignore
).
Published by mikaello about 5 years ago
Upgrade of dev-dependencies (TypeScript and testing (Jest/mockdate))
Published by mikaello over 5 years ago
Compiling Typescript source code to ES5 (ES6 previously)
Published by mikaello over 5 years ago
The library is rewritten to TypeScript. Distributet code is in ES5, but contains both index.ts.js
and index.flow.js
as well.
Published by mikaello over 5 years ago
Removed moment
as a dependency (#8), thanks to @kmkr
Published by mikaello almost 6 years ago
This release is compliant with the rules of the individual number, which determines unambiguously which century a person is born. The new function possibleAgeOfPersonWithIdNumber()
should be used.
The old possibleAgesOfPersonWithIdNumber()
(which returns an array) is now deprecated.