# is-valid-fodselsnummer

> Check if input is a valid national identification number of Norway

Latest version **4.0.0** (published 2021-10-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install is-valid-fodselsnummer
pnpm add is-valid-fodselsnummer
yarn add is-valid-fodselsnummer
bun add is-valid-fodselsnummer
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: no vulnerabilities; high maintenance score.

Warnings: low downloads; no types; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 4.0.0 |
| Published | 2021-10-23 |
| First published | 2015-07-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=14.18.1 |
| Dependencies | 0 |
| Unpacked size | 8.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Geir Gåsodden |
| Maintainers | zrrrzzt |
| Keywords | Fødselsnummer, Fodselsnummer, Validation, National Identification Number, Norway |

## Links

- npm: https://www.npmjs.com/package/is-valid-fodselsnummer
- Repository: https://github.com/zrrrzzt/is-valid-fodselsnummer
- Homepage: https://github.com/zrrrzzt/is-valid-fodselsnummer#readme
- Issues: https://github.com/zrrrzzt/is-valid-fodselsnummer/issues
- npm.io page: https://npm.io/package/is-valid-fodselsnummer

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 4.0.0 (latest) — 2021-10-23
- 3.0.5 — 2019-07-15
- 3.0.4 — 2019-07-12
- 3.0.3 — 2019-02-14
- 3.0.2 — 2018-09-26
- 3.0.1 — 2018-04-25
- 3.0.0 — 2018-02-15
- 2.1.0 — 2017-08-23
- 2.0.1 — 2016-11-17
- 2.0.0 — 2016-11-08
- 1.0.8 — 2015-12-02
- 1.0.7 — 2015-07-17
- 1.0.6 — 2015-07-11
- 1.0.3 — 2015-07-10
- 1.0.1 — 2015-07-10
- … 1 more at https://npm.io/package/is-valid-fodselsnummer/versions

## README

[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard)

# is-valid-fodselsnummer

Check if supplied input is valid fødselsnummer ([Norwegian national identification number](https://en.wikipedia.org/wiki/National_identification_number#Norway)).

Identify if number is an F or [D-number](https://no.wikipedia.org/wiki/F%C3%B8dselsnummer#D-nummer)

## Installation

From npm

```sh
$ npm i --save is-valid-fodselsnummer
```

From GitHub

```sh
$ git clone https://github.com/zrrrzzt/is-valid-fodselsnummer.git
```

cd into directory and install dependencies

```sh
$ npm run setup
```

## Usage validation

```JavaScript
const isValidFodselsnummer = require('is-valid-fodselsnummer')

isValidFodselsnummer('01010750160')
// => true

isValidFodselsnummer('12341234567')
// => false

```

## Usage identification

```JavaScript
const isValidFodselsnummer = require('is-valid-fodselsnummer')

isValidFodselsnummer('01010750160', true)
// => F

isValidFodselsnummer('41085801188', true)
// => D

isValidFodselsnummer('12341234567', true)
// => false

```


## Related

- [is-valid-fodselsnummer-cli](https://github.com/zrrrzzt/is-valid-fodselsnummer-cli) CLI version of this module

## License

[MIT](LICENSE)

---
_Source: https://npm.io/package/is-valid-fodselsnummer · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
