A library for validating national identity numbers for both people and organizations.
- norwegian
- danish
- swedish
- finnish
yarn add national-id
npm i national-id
import { Norwegian } from 'national-id'
// usage through static implementation
Norwegian.person.isValid('01065100394')
...
import { Danish } from 'national-id'
// usage through static implementation
Danish.person.isValid('0811115676')
...
import { Swedish } from 'national-id'
// usage through static implementation
Swedish.person.isValid('0811115676')
...
import { Finnish } from 'national-id'
// usage through static implementation
Finnish.person.isValid('0811115676')
...
Everyone is allowed to contribute, but please raise an issue discussing what you want to do if it is anything major. Make sure to run tests and build commands if changing functionality. Write new tests if adding functionality.
All countries should have similar functions exposed, as defined by the Nation interface