Socket
Socket
Sign inDemoInstall

carto-geocoding-sql

Package Overview
Dependencies
1
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.2 to 0.0.3

10

index.js

@@ -12,4 +12,10 @@ /*eslint no-undef: "error"*/

}
var locations = (arguments.length > 1) ? Array.prototype.slice.call(arguments) : [arguments[0]];
var locations;
if (arguments.length > 1) {
locations = Array.prototype.slice.call(arguments);
} else if (Array.isArray(arguments[0])) {
locations = arguments[0];
} else {
locations = [arguments[0]];
}
var fragmentFunctionList = locations.map(function(location) {

@@ -16,0 +22,0 @@ return geocode(location);

2

package.json
{
"name": "carto-geocoding-sql",
"version": "0.0.2",
"version": "0.0.3",
"description": "Turns simple text locations into SQL queries to be run against CARTO geocoding API",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -47,2 +47,5 @@ /*eslint-env mocha*/

});
it('should work with multiple geocodes in an array', function() {
expect(geocode(['Utrecht', '81.204.10.10', 'Roelof Hartplein 2G, Amsterdam, Nederland'])).to.equal("SELECT cdb_geocode_namedplace_point('Utrecht') the_geom UNION SELECT cdb_geocode_ipaddress_point('81.204.10.10') the_geom UNION SELECT cdb_geocode_street_point('Roelof Hartplein 2G','Amsterdam','','Nederland') the_geom;");
});
/* eslint-enable quotes */

@@ -49,0 +52,0 @@ });

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc