🚀 Socket Launch Week Day 4:Socket MCP Adds Org Alerts, Threat Feed Review, and Package Inspection.Learn more
Sign In

swe-validation

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

swe-validation

Validation for Swedish Social Security number and Corporation identity number

latest
Source
npmnpm
Version
1.0.1
Version published
Weekly downloads
774
210.84%
Maintainers
1
Weekly downloads
 
Created
Source

swe-validation

Validation for Swedish Social Security number and Corporation identity number

Install with npm:

$ npm install swe-validation

##Examples

var validate = require('swe-validation');

validate.isSSn('8112189876')    //8112189876
validate.isSSn('19811218-9876') //8112189876
validate.isSSn('8112189877')    //null

validate.isCin('5560360793') //5560360793
validate.isCin('8112189877') //null

validate.ssn('8112189876') //{ isValid: true, person: { type: 'Personnummer', sex: 'Man', ssn: '8112189876' }
validate.ssn('8112189877') //{ isValid: false }

validate.cin('5560360793') //{ isValid: true, corporation: { type: 'Aktiebolag', id: '5560360793' } }
validate.cin('8112189877') //{ isValid: false }

Keywords

validate

FAQs

Package last updated on 11 Oct 2016

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