Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
all-the-cities
Advanced tools
All the 138,398 cities of the world with a population of at least 1000 inhabitants, in a big JSON array
All the 138,398 cities of the world with a population of at least 1000 inhabitants, in a big JSON array that is ready to be imported in MongoDB for geoSpatialSearch
.
Derived from the cities-with-1000 npm package, which in turn came from geonames.org data.
Download node at nodejs.org and install it, if you haven't already.
npm install all-the-cities --save
const cities = require('all-the-cities');
cities.filter(city => city.name.match('Albuquerque'));
/*
[{
cityId: '5454711',
name: 'Albuquerque',
country: 'US',
altCountry: '',
muni: '',
muniSub: '',
featureClass: 'P',
featureCode: 'PPLA2',
adminCode: 'NM',
population: 545852,
loc: {
type: 'Point',
coordinates: [-106.65114, 35.084]
}
}, {
cityId: '5476960',
name: 'Los Ranchos de Albuquerque',
country: 'US',
altCountry: '',
muni: '',
muniSub: '',
featureClass: 'P',
featureCode: 'PPL',
adminCode: 'NM',
population: 6024,
loc: {
type: 'Point',
coordinates: [-106.6428, 35.16199]
}
}]
*/
id - Id of the city (same in openWeatherMap)
name
altName
country
featureCode
adminCode
population
loc: { type: 'Point', coordinates: [0, 0] }
for **GEO JSON data**, a particular format is needed in MongoDB Schema as written in loc field above
npm install
npm test
None
MIT
FAQs
All the 138,398 cities of the world with a population of at least 1000 inhabitants, in a big JSON array
The npm package all-the-cities receives a total of 2,756 weekly downloads. As such, all-the-cities popularity was classified as popular.
We found that all-the-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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.