Skip to content

This is a NPM package to help you verify Swedish social security numbers , oherwise called SSN, with ease. Lightweight package without any useless extra functionality.

License

Notifications You must be signed in to change notification settings

felixwetell/swedish-social-security-number

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Swedish Social Security Number

Description

This is a NPM package to help you verify Swedish social security numbers, oherwise called SSN, with ease. Lightweight package without any useless extra functionality.

Installing

To get the latest version run this command in your project: npm i swedish-social-security-number

Usage

var swedishSocialSecurityNumber = require("swedish-social-security-number");

See test.js for more examples

Example

import Ssn from 'swedish-social-security-number';

Ssn.verifySsn('9710286098');
//=> true

Functions

verifySsn (string) This method is used to check if a Swedish social security number (SSN). Only accepts SSN's aas string in short format.

verifySex (string) Verifies if the SSN is for a male or a female. Only accepts SSN's aas string in short format.

About

This is a NPM package to help you verify Swedish social security numbers , oherwise called SSN, with ease. Lightweight package without any useless extra functionality.

Topics

Resources

License

Stars

Watchers

Forks