national-id
TypeScript icon, indicating that this package has built-in type declarations

7.1.0 • Public • Published

NationalId 🆔

A library for validating national identity numbers for both people and organizations.

Supported countries 🌐

  • norwegian
  • danish
  • swedish
  • finnish

Install 📦

Yarn

yarn add national-id

Npm

npm i national-id

Usage 🚀

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

...

How to contribute 🤝

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

Readme

Keywords

none

Package Sidebar

Install

npm i national-id

Weekly Downloads

1,047

Version

7.1.0

License

MIT

Unpacked Size

45.8 kB

Total Files

71

Last publish

Collaborators

  • slem