Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@coex/geosearch

Package Overview
Dependencies
Maintainers
3
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@coex/geosearch - npm Package Compare versions

Comparing version 0.4.1 to 0.4.2

12

geosearch.js

@@ -12,4 +12,4 @@ "use strict";

async suggest(query, options) {
const bounds = await utils_1.getBounds(options).catch(() => {
throw utils_1.createError('Input Error');
const bounds = await (0, utils_1.getBounds)(options).catch(() => {
throw (0, utils_1.createError)('Input Error');
});

@@ -24,10 +24,10 @@ const apiUrl = `${variables_1.API_URL}?count=${variables_1.COUNT}&phrase=${encodeURIComponent(query)}${bounds}`;

if (!axiosError.response) {
throw utils_1.createError('Network Error', axiosError.response, axiosError);
throw (0, utils_1.createError)('Network Error', axiosError.response, axiosError);
}
throw utils_1.createError('API request failed', axiosError.response, axiosError);
throw (0, utils_1.createError)('API request failed', axiosError.response, axiosError);
});
if (response.statusText === 'OK' || response.status === 200) {
return utils_1.filterData(response.data.result, options);
return (0, utils_1.filterData)(response.data.result, options);
}
throw utils_1.createError('API request failed', response);
throw (0, utils_1.createError)('API request failed', response);
}

@@ -34,0 +34,0 @@ }

{
"name": "@coex/geosearch",
"version": "0.4.1",
"version": "0.4.2",
"description": "Nodejs library for finding places using Mapy.cz Suggest API",

@@ -23,3 +23,3 @@ "main": "./index.js",

"dependencies": {
"axios": "^0.21.1"
"axios": "^0.21.4"
},

@@ -26,0 +26,0 @@ "repository": {

@@ -10,3 +10,3 @@ "use strict";

if ((options === null || options === void 0 ? void 0 : options.bounds) || (options === null || options === void 0 ? void 0 : options.country)) {
bounds = (options === null || options === void 0 ? void 0 : options.bounds) || countries_1.getCountryBounds(options === null || options === void 0 ? void 0 : options.country);
bounds = (options === null || options === void 0 ? void 0 : options.bounds) || (0, countries_1.getCountryBounds)(options === null || options === void 0 ? void 0 : options.country);
if (bounds) {

@@ -13,0 +13,0 @@ boundsString = `&bounds=${encodeURIComponent(`${bounds.sw.lat},${bounds.sw.lng}|${bounds.ne.lat},${bounds.ne.lng}`)}`;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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