personnummer
Advanced tools
Comparing version 3.1.0 to 3.1.1
@@ -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; |
{ | ||
"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 |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
34560
1236
0