Ok, so still not quite on par with the amazing
re:places is a serverless database of 41,000 global cities for your browser. Designed as a light-weight polyfill for ‘cities’ from Algolia's places API, ahead of the service’s sunset in May 2022. It also runs standalone.
IP, proximity to a
lat,lng, or the area inside a
re:places depends on @lucaong/MiniSearch and @rowanwins/point-in-polygon-hao (both MIT / 0 dependencies). The database is derived from the basic World Cities Database available from SimpleMaps.com (CC BY 4.0). Ideas mixed in from @turfjs and this stackoverflow answer. Cloudflare's 220.127.116.11 supplies location hints. Informing everything, of course, is the masterwork that is Algolia Places.
All amazing efforts. Thank you so much.