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

city

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

city - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

package.json
{
"name": "city",
"version": "1.0.0",
"version": "1.0.1",
"description": "TheCity API returns the city from a latitude and longitude using spatial mapping and data anlysis.",

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

@@ -1,5 +0,5 @@

# City Grabber
This is a wrapper for the City Grabber API which gets a city or closest city from a latitude and longitude.
# City
The City Library is a wrapper for the City API which gets a city or closest city from a latitude and longitude.
City grabber uses an algorithim that utilises spatial mapping and sophisticated data analysis to give you a blazing fast and accurate response from over 150,000 cities from every country across the globe.
The City API uses an algorithim that utilises spatial mapping and sophisticated data analysis to give you a blazing fast and accurate response from over 150,000 cities from every country across the globe.

@@ -12,3 +12,3 @@ This package requires an API key which can be generated [Here](https://city.rocket-solutions.co.uk/key).

`npm i city-grabber --save`
`npm i city --save`

@@ -18,8 +18,8 @@ ## Usage

```
const cityGrabber = require( 'city-grabber' )
const city = require( 'city' )
//Using Promises
cityGrabber.get( latitude, longitude, size, apiKey )
.then( response => {
const { city, country, population, distance } = response
city.get( latitude, longitude, size, apiKey )
.then( location => {
console.log( location )
})

@@ -29,3 +29,3 @@ .catch( e => console.log( e ))

//Async await
const { city, country, population, distance } = await cityGrabber.get( latitude, longitude, size, apiKey )
const location = await city.get( latitude, longitude, size, apiKey )
```

@@ -45,3 +45,3 @@

```
cityGrabber.get( 35.4526317, 139.4546863, 0, apiKey )
city.get( 35.4526317, 139.4546863, 0, apiKey )
//Response

@@ -55,3 +55,3 @@ {

cityGrabber.get( 42.34133262, -83.05576000, 1, apiKey )
city.get( 42.34133262, -83.05576000, 1, apiKey )
//Response

@@ -58,0 +58,0 @@ {

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