
Product
Introducing the Alert Details Page: A Better Way to Explore Alerts
Socket's new Alert Details page is designed to surface more context, with a clearer layout, reachability dependency chains, and structured review.
nearby-cities
Advanced tools
Give me your coordinates and I'll tell you where the nearest cities are. Works offline.
Give me your coordinates and I'll tell you where the nearest cities are. Works offline.
Download node at nodejs.org and install it, if you haven't already.
npm install nearby-cities --save
const nearbyCities = require("nearby-cities")
const query = {latitude: 34.4362755, longitude: -119.705086}
const cities = nearbyCities(query)
assert.equal(cities[0].name, 'Mission Canyon')
assert.equal(cities[1].name, 'Santa Barbara')
assert.equal(cities[2].name, 'Montecito')
assert.equal(cities[3].name, 'Summerland')
assert.equal(cities[4].name, 'Goleta')
console.log(cities[0])
/*
{
name: "Mission Canyon",
country: "US",
featureClass: "P",
featureCode: "PPL",
adminCode: "CA",
population: 2381,
lat: 34.45083,
lon: -119.71291
}
*/
npm install
npm test
MIT
Generated by package-json-to-readme
FAQs
Give me your coordinates and I'll tell you where the nearest cities are. Works offline.
We found that nearby-cities demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Product
Socket's new Alert Details page is designed to surface more context, with a clearer layout, reachability dependency chains, and structured review.

Product
Campaign-level threat intelligence in Socket now shows when active supply chain attacks affect your repositories and packages.

Research
Malicious PyPI package sympy-dev targets SymPy users, a Python symbolic math library with 85 million monthly downloads.