1.2.1 • Published 4 years ago

social-number-de v1.2.1

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

Maintainability

What is this?

social-number-de is a german Social Number (https://de.wikipedia.org/wiki/Sozialversicherungsnummer) parser and generator for the Browser and Node.js.

Installation

npm install social-number-de

Introduce Class

import { SocialNumberDe } from  'social-number-de';

  

const  sin  =  new  SocialNumberDe();

Parsing

Use the .isValid() to determine Social Number validity.

import { SocialNumberDe } from  'social-number-de';

  

const  sin  =  new  SocialNumberDe();

sin.isValid("55347124W504");

// Returns: true

  

sin.isValid("55347124W502");

// Returns: false

Generating

Use the .getRandomID() class method to generate a valid random Social Number.

sin.getRandomID()

// Returns a random SIN, e.g. "49973455Z450"

inspired by wealthsimple/social-insurance-number

Supported by

1.2.1

4 years ago

1.2.0

4 years ago

1.1.0

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago