Validate Swedish personal identity numbers.
Install the module with npm:
npm install --save personnummer
import Personnummer from 'personnummer';
Personnummer.valid('191212121212')
//=> trueSee index.test.ts for more examples.
| Option | Type | Default | Description |
|---|---|---|---|
| allowCoordinationNumber | bool | true | Accept coordination numbers |
| allowInterimNumber | bool | false | Accept interim/T numbers |
MIT