Socket
Book a DemoInstallSign in
Socket

@ssfbank/norwegian-id-validators

Package Overview
Dependencies
Maintainers
2
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ssfbank/norwegian-id-validators

Validates norwegian ssn, orgno(both statically and API), accountno and KID. Based on npm pkg norsk-validator.

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
100
40.85%
Maintainers
2
Weekly downloads
 
Created
Source

Norwegian Id number validators

  • Validates statically norwegian ssn, kid, account and organization numbers.
  • Generates statically a random norwegian SSN from a birth date.
  • Should be usable in most js/ts environments.

TS+Babel fork of npm pkg norsk-validator. Credit goes to original author https://github.com/storbukas/norsk-validator

Usage

npm install @ssfbank/norwegian-id-validators
import { validateSsn, 
generateDigitsSsn, 
validateKid, 
validateAccount, 
validateOrg
} from '@ssfbank/norwegian-id-validators';

const valid = validateSsn('26068848740');
const valid = validateSsn('260688 48740');
const valid = validateKid('100001928231');
const valid = validateOrg('998 447 356');
const valid = validateAccount('7694.05.12057');

const ssn = generateDigitsSsn('260688');
// random valid ssn, like 26068848740

Keywords

fodselsnummer

FAQs

Package last updated on 29 Apr 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts