Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

personnummer

Package Overview
Dependencies
Maintainers
2
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

personnummer - npm Package Compare versions

Comparing version 3.1.0 to 3.1.1

5

dist/cjs/index.js

@@ -447,3 +447,3 @@ 'use strict';

value: function parse(ssn, options) {
var reg = /^(\d{2}){0,1}(\d{2})(\d{2})(\d{2})([\+\-\s]?)((?!000)\d{3})(\d)$/;
var reg = /^(\d{2}){0,1}(\d{2})(\d{2})(\d{2})([+\-\s]?)((?!000)\d{3})(\d)$/;
var match = reg.exec(ssn);

@@ -468,2 +468,3 @@

if (sep === '+') {
this._sep = '+';
baseYear = d.getFullYear() - 100;

@@ -487,3 +488,3 @@ } else {

this._year = year;
this._fullYear = century + year;
this._fullYear = this._century + year;
this._month = month;

@@ -490,0 +491,0 @@ this._day = day;

@@ -445,3 +445,3 @@ function _classCallCheck(instance, Constructor) {

value: function parse(ssn, options) {
var reg = /^(\d{2}){0,1}(\d{2})(\d{2})(\d{2})([\+\-\s]?)((?!000)\d{3})(\d)$/;
var reg = /^(\d{2}){0,1}(\d{2})(\d{2})(\d{2})([+\-\s]?)((?!000)\d{3})(\d)$/;
var match = reg.exec(ssn);

@@ -466,2 +466,3 @@

if (sep === '+') {
this._sep = '+';
baseYear = d.getFullYear() - 100;

@@ -485,3 +486,3 @@ } else {

this._year = year;
this._fullYear = century + year;
this._fullYear = this._century + year;
this._month = month;

@@ -488,0 +489,0 @@ this._day = day;

47

package.json
{
"name": "personnummer",
"description": "Validate Swedish personal identity numbers",
"version": "3.1.0",
"version": "3.1.1",
"license": "MIT",

@@ -32,23 +32,23 @@ "homepage": "https://github.com/personnummer/js",

"devDependencies": {
"@babel/cli": "^7.10.1",
"@babel/core": "^7.10.2",
"@babel/preset-typescript": "^7.10.1",
"@jitesoft/babel-preset-main": "^2.3.1",
"@rollup/plugin-babel": "^5.0.3",
"@rollup/plugin-commonjs": "^13.0.0",
"@rollup/plugin-node-resolve": "^8.0.1",
"@types/jest": "^26.0.0",
"@typescript-eslint/eslint-plugin": "^3.3.0",
"@typescript-eslint/parser": "^3.3.0",
"babel-eslint": "^10.1.0",
"babel-loader": "^8.1.0",
"core-js": "^3.6.5",
"eslint": "^7.2.0",
"jest": "^26.0.1",
"node-fetch": "^2.6.0",
"prettier": "^2.0.5",
"@babel/cli": "^7.12.1",
"@babel/core": "^7.12.3",
"@babel/eslint-parser": "^7.12.1",
"@babel/preset-typescript": "^7.12.1",
"@jitesoft/babel-preset-main": "^2.6.1",
"@rollup/plugin-babel": "^5.2.1",
"@rollup/plugin-commonjs": "^16.0.0",
"@rollup/plugin-node-resolve": "^10.0.0",
"@types/jest": "^26.0.15",
"@typescript-eslint/eslint-plugin": "^4.7.0",
"@typescript-eslint/parser": "^4.7.0",
"babel-loader": "^8.2.1",
"core-js": "^3.7.0",
"eslint": "^7.13.0",
"jest": "^26.6.3",
"node-fetch": "^2.6.1",
"prettier": "^2.1.2",
"rimraf": "^3.0.2",
"rollup": "^2.16.1",
"tslib": "^2.0.0",
"typescript": "^3.9.5"
"rollup": "^2.33.1",
"tslib": "^2.0.3",
"typescript": "^4.0.5"
},

@@ -62,6 +62,3 @@ "keywords": [

"numbers"
],
"semistandard": {
"parser": "babel-eslint"
}
]
}

@@ -20,3 +20,3 @@ # personnummer [![Build Status](https://github.com/personnummer/js/workflows/build/badge.svg)](https://github.com/personnummer/js/actions)

See [test.js](test.js) for more examples.
See [test.ts](test.ts) for more examples.

@@ -23,0 +23,0 @@ ## License

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc