Socket
Socket
Sign inDemoInstall

swe-validation

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

swe-validation

Validation for Swedish Social Security number and Corporation identity number


Version published
Weekly downloads
259
decreased by-58.16%
Maintainers
1
Created
Weekly downloads
 

Readme

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

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc