@coex/geosearch
Advanced tools
Comparing version 0.4.1 to 0.4.2
@@ -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
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
20004
Updatedaxios@^0.21.4