Socket
Book a DemoInstallSign in
Socket

irem

Package Overview
Dependencies
Maintainers
0
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

irem

Search for any city in any language in Earth.

1.1.0
latest
Source
npmnpm
Version published
Weekly downloads
10
100%
Maintainers
0
Weekly downloads
 
Created
Source

irem

Format, Test and Build | Statements

Search for any place in any language in Earth.

Logo

Usage

Use API

Search for "Keçi" in Turkish

Search for "随机" in English (default)

Nearby places around Ankara,Turkiye

Works only in nodejs environment. Stores data in the folder named data in TSV file format or gzipped format or in binary format.

Logo

Use npm

Run command npm i irem

import ESM module

import { getPlaceSuggestionsByText, getNearbyPlaces, getPlaceById } from 'irem';

Documentation

function getPlaceSuggestionsByText

Returns a list of places based on search term in given language. if latitude and longitude is provided, the list is sorted by distance, otherwise sorted by text match. countryCode is a two letters string represents a country such as TR or US. If it's provided, results from the country will have precedence. maxResultCount is the size of returned array length. It should be in [0,100] range If language is undefined, results will be returned in English.

async function getPlaceSuggestionsByText(
  searchTerm: string,
  language?: SupportedLanguage,
  latitude?: number,
  longitude?: number,
  maxResultCount = 10,
  countryCode: CountryCode | "" = "",
): Promise<PlaceMatchWithCountry[]>

function getNearbyPlaces

Returns a list of places based on provided latitude and longitude values in given language. The list is sorted by distance. maxResultCount is the size of returned array length. It should be in [0,100] range

async function getNearbyPlaces(
  latitude: number,
  longitude: number,
  language?: SupportedLanguage,
  maxResultCount = 10,
): Promise<PlaceWithCountry[]>

function getPlaceById

Returns a PlaceWithCountry object from provided id. Id must exist in db.tsv file

async function getPlaceById(placeId: number, language?: SupportedLanguage)

Built for vakit

Keywords

osm

FAQs

Package last updated on 11 Jan 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.