Ok, so still not quite on par with the amazing <Algolia-Places> ...

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.

Some basic features:

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 (CC BY 4.0). Ideas mixed in from @turfjs and this stackoverflow answer. Cloudflare's supplies location hints. Informing everything, of course, is the masterwork that is Algolia Places.
All amazing efforts. Thank you so much.

or Fork it on GitHub