New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

sparc-commons

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sparc-commons - npm Package Compare versions

Comparing version 0.2.23 to 0.2.24

11

libs/geocode.js

@@ -9,3 +9,10 @@ var _ = require('lodash')

// var stream = resources.jsonStreamRequest("mapquest", "reverse-geocoding", {data:{"location": lat + ',' + lon}});
return resources.requestResource("beestar", "reverse-geocoding", {data:{"lat": lat, "lon" : lon, "format": "json", "accept-language" : "en-GB" }})
return resources.requestResource("beestar", "reverse-geocoding", {
data: {
lat: lat,
lon : lon,
format: "json",
accept-language: "en-GB"
}
})
.then(function(data){

@@ -20,4 +27,4 @@ var response = data;

return response;
//return _.get(response, "address", {});
});
}

@@ -331,11 +331,21 @@ /*jshint multistr: true */

// set an offset to the substr, otherwise is 0
var signs = ["+", "-"];
var isLatNegative = false
var isLonNegative = false
if(signs.indexOf(lat.charAt(0)) > -1){
signedlat = 1;
if(["-"].indexOf(lat.charAt(0)) > -1) {
isLatNegative = true
}
}
if(signs.indexOf(lon.charAt(0)) > -1){
signedlon = 1;
if(["-"].indexOf(lon.charAt(0)) > -1) {
isLonNegative = true
}
}
var latd = lat.substr(0, 2 + signedlat);

@@ -346,2 +356,3 @@ var latm = lat.substr(2 + signedlat, 7 + signedlat);

// Convert to Leaflet.js compatible format

@@ -356,3 +367,12 @@ var convlat = parseInt(latd) + (parseFloat(latm) / 60);

latitude = convlat.toFixed(5);
if(isLatNegative) {
latitude = - latitude
}
longitude = convlon.toFixed(5);
if(isLonNegative) {
longitude = - longitude
}
return [latitude, longitude];

@@ -359,0 +379,0 @@ }

2

package.json
{
"name": "sparc-commons",
"version": "0.2.23",
"version": "0.2.24",
"description": "Library with all small time common stuff used across the SPARC echosystem",

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

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