social-insurance-number
Advanced tools
Comparing version 0.2.1 to 0.2.2
{ | ||
"name": "social-insurance-number", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "Canadian SIN (Social Insurance Number) parser and generator", | ||
"main": "social-insurance-number.js", | ||
"scripts": { | ||
"test": "jest" | ||
"test": "jest", | ||
"escheck": "es-check es5 social-insurance-number.js" | ||
}, | ||
@@ -21,2 +22,3 @@ "repository": { | ||
"devDependencies": { | ||
"es-check": "^5.2.3", | ||
"jest": "^24.5.0", | ||
@@ -23,0 +25,0 @@ "semantic-release": "^15.13.3" |
@@ -91,3 +91,3 @@ (function(global) { | ||
doesNotStartWith = [].concat(doesNotStartWith); | ||
var possibleSinPrefixes = [...new Set([].concat.apply([], Object.values(PROVINCES)))]; | ||
var possibleSinPrefixes = Array.from(new Set([].concat.apply([], Object.values(PROVINCES)))); | ||
@@ -98,6 +98,8 @@ if (province) { | ||
var validStartsWithChoices = possibleSinPrefixes.filter( | ||
(prefix) => !doesNotStartWith.includes(String(prefix)) | ||
); | ||
var filter = function(prefix) { | ||
return !doesNotStartWith.includes(String(prefix)) | ||
} | ||
var validStartsWithChoices = possibleSinPrefixes.filter(filter); | ||
if (!validStartsWithChoices.length) { | ||
@@ -104,0 +106,0 @@ throw "Cannot find a valid number to start with."; |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
14569
7
276
0
3