Socket
Socket
Sign inDemoInstall

pelias-openstreetmap

Package Overview
Dependencies
Maintainers
1
Versions
145
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pelias-openstreetmap - npm Package Compare versions

Comparing version 5.11.2 to 5.12.0

2

package.json
{
"name": "pelias-openstreetmap",
"version": "5.11.2",
"version": "5.12.0",
"engines": {

@@ -5,0 +5,0 @@ "node": ">=10.0.0"

@@ -65,3 +65,4 @@

if( val3 ){
doc.setAddress( ADDRESS_SCHEMA[key], val3 );
let label = ADDRESS_SCHEMA[key];
doc.setAddress(label, normalizeAddressField(label, val3));
}

@@ -153,1 +154,18 @@ }

}
// apply some very basic normalization
// note: in the future we should consider doing something more advanced like:
// https://github.com/pelias/openaddresses/pull/477
function normalizeAddressField(key, value) {
if (key === 'street') {
// contract English diagonals
value = value
.replace(/\b(northwest)\b/i, 'NW')
.replace(/\b(northeast)\b/i, 'NE')
.replace(/\b(southwest)\b/i, 'SW')
.replace(/\b(southeast)\b/i, 'SE');
}
return value;
}
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