Socket
Socket
Sign inDemoInstall

@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.5.0 to 0.6.0

2

geosearch.js

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

});
const apiUrl = `${variables_1.API_URL}?count=${variables_1.COUNT}&phrase=${encodeURIComponent(query)}${bounds}`;
const apiUrl = `${variables_1.API_URL}?count=${variables_1.COUNT}&lang=${options === null || options === void 0 ? void 0 : options.lang}&phrase=${encodeURIComponent(query)}${bounds}`;
// For debugging

@@ -18,0 +18,0 @@ if (options === null || options === void 0 ? void 0 : options.debug) {

@@ -61,2 +61,3 @@ import { AxiosError, AxiosResponse } from 'axios';

debug?: boolean;
lang?: 'en' | 'cs' | 'de' | 'pl' | 'sk' | 'ru' | 'es' | 'fr';
}

@@ -69,5 +70,5 @@ export declare type GeoSearchErrorMessage = 'Error' | 'Network Error' | 'Input Error' | 'API request failed';

axiosError?: AxiosError;
axiosResponse?: AxiosResponse;
axiosResponse?: AxiosResponse<GeoSearchData>;
}
export declare type GeoSearchCountries = 'cz' | 'sk' | 'de' | 'us' | 'gb' | 'jp';
export declare type GeoSearchScope = 'muni' | 'area' | 'pubt' | 'street';
{
"name": "@coex/geosearch",
"version": "0.5.0",
"version": "0.6.0",
"description": "Nodejs library for finding places using Mapy.cz Suggest API",

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

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

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

@@ -157,8 +157,9 @@ [![npm version](https://badge.fury.io/js/%40coex%2Fgeosearch.svg)](https://www.npmjs.com/package/@coex/geosearch)

| Option | Type | Default | Description |
| ----------- | -------------------------------------------------------- | ------- | ----------------------------------------------------------------------------------------------- |
| **scope** | `'muni'` \| `'area'` \| `'pubt'` \| `'street'` | null | Preferred category of results |
| **bounds** | `{ sw: LatLng, ne: LatLng}` | null | Preffered country boundaries |
| **country** | `'cz'` \| `'sk'` \| `'us'` \| `'de'` \| `'gb'` \| `'jp'` | null | Preferred country. Same as bounds but with some presets. Feel free to add more via pull request |
| **debug** | boolean | false | Print additional information to console |
| Option | Type | Default | Description |
| ----------- | ---------------------------------------------------------------------------- | ------- | ----------------------------------------------------------------------------------------------- |
| **scope** | `'muni'` \| `'area'` \| `'pubt'` \| `'street'` | null | Preferred category of results |
| **bounds** | `{ sw: LatLng, ne: LatLng}` | null | Preffered country boundaries |
| **country** | `'cz'` \| `'sk'` \| `'us'` \| `'de'` \| `'gb'` \| `'jp'` | null | Preferred country. Same as bounds but with some presets. Feel free to add more via pull request |
| **lang** | `'en'` \| `'cs'` \| `'de'` \| `'pl'` \| `'sk'` \| `'ru'` \| `'es'` \| `'fr'` | `cs` | Preferred language |
| **debug** | boolean | false | Print additional information to console |

@@ -165,0 +166,0 @@ ## Development

import { AxiosError, AxiosResponse } from 'axios';
import { GeoSearchError, GeoSearchErrorMessage, GeoSearchOptions, GeoSearchResult } from '../interface/geosearch.interface';
import { GeoSearchData, GeoSearchError, GeoSearchErrorMessage, GeoSearchOptions, GeoSearchResult } from '../interface/geosearch.interface';
export declare const getBounds: (options: GeoSearchOptions | undefined) => Promise<string>;
export declare const createError: (message: GeoSearchErrorMessage, axiosResponse?: AxiosResponse<any> | undefined, axiosError?: AxiosError<any> | undefined) => GeoSearchError;
export declare const createError: (message: GeoSearchErrorMessage, axiosResponse?: AxiosResponse<GeoSearchData> | undefined, axiosError?: AxiosError<never> | undefined) => GeoSearchError;
export declare const isGeoSearchError: (e: Error | GeoSearchError) => e is GeoSearchError;
export declare function filterData(data: GeoSearchResult[], options: GeoSearchOptions | undefined): GeoSearchResult[];

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