norwegian-national-id-validator

Validate Norwegian national identity numbers

MIT License

Downloads
23.8K
Stars
24
Committers
8

Bot releases are hidden (Show)

norwegian-national-id-validator - v3.1.1 Latest Release

Published by mikaello almost 2 years ago

norwegian-national-id-validator - v3.1.0

Published by mikaello over 2 years ago

New features:

Expose birth date in object oriented API: https://github.com/mikaello/norwegian-national-id-validator/pull/44

norwegian-national-id-validator - v3.0.0

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.

norwegian-national-id-validator - v2.0.0

Published by mikaello over 4 years ago

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 returned type IdNumberType before, but this is changed to enum 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 !

norwegian-national-id-validator - v1.3.8

Published by mikaello over 4 years ago

Upgrade dev dependencies (security update of acorn)

norwegian-national-id-validator - v1.3.7

Published by mikaello over 4 years ago

Upgrade dev dependencies (jest/typescript)

norwegian-national-id-validator - v1.3.6

Published by mikaello almost 5 years ago

Fix for users with non expected timezone (#18)

norwegian-national-id-validator -

Published by mikaello about 5 years ago

Upgrade of a vulnerable third party dependency (set-value).

norwegian-national-id-validator - v1.3.4

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).

norwegian-national-id-validator - v1.3.3

Published by mikaello about 5 years ago

Upgrade of dev-dependencies (TypeScript and testing (Jest/mockdate))

norwegian-national-id-validator - v1.3.2

Published by mikaello over 5 years ago

Compiling Typescript source code to ES5 (ES6 previously)

norwegian-national-id-validator - v1.3.1 - rewrite to TypeScript

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.

norwegian-national-id-validator - v1.3.0

Published by mikaello over 5 years ago

Enhancement

Removed moment as a dependency (#8), thanks to @kmkr

norwegian-national-id-validator - v1.2.0

Published by mikaello almost 6 years ago

Enhancement

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.

Deprecation

The old possibleAgesOfPersonWithIdNumber() (which returns an array) is now deprecated.