codes-postaux
Advanced tools
Comparing version 1.0.2 to 1.0.3
11
index.js
@@ -1,9 +0,12 @@ | ||
var _ = require('lodash'); | ||
var index = {}; | ||
var data = require('./codes-postaux.json'); | ||
require('./codes-postaux.json').forEach(function (entry) { | ||
if (!(entry.codePostal in index)) { | ||
index[entry.codePostal] = []; | ||
} | ||
index[entry.codePostal].push(entry); | ||
}); | ||
var index = _.groupBy(data, 'codePostal'); | ||
exports.find = function(postalCode) { | ||
return index[postalCode] || []; | ||
}; |
{ | ||
"name": "codes-postaux", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "French postal codes API for Node.js", | ||
@@ -28,3 +28,2 @@ "repository": { | ||
"dependencies": { | ||
"lodash": "^4.13.1" | ||
}, | ||
@@ -31,0 +30,0 @@ "devDependencies": { |
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
529058
0
28
1
- Removedlodash@^4.13.1
- Removedlodash@4.17.21(transitive)