Skip to content
personnummerPublic

Repository files navigation

personnummer Build Status NPM Downloads

Validate Swedish personal identity numbers.

Install the module with npm:

npm install --save personnummer

Example

import Personnummer from 'personnummer';

Personnummer.valid('191212121212')
//=> true

See index.test.ts for more examples.

Options

Option Type Default Description
allowCoordinationNumber bool true Accept coordination numbers
allowInterimNumber bool false Accept interim/T numbers

In memoriam

Fredrik "Frozzare" Forsmo (1991-2026) was the initiator, co-founder and a core contributor of the personnummer project. This library carries his work. He is missed.

License

MIT

Releases

Sponsor this project

Packages

Used by

Contributors

Languages