Check to see if long/lat is in the range of a location with getCurrentGeoLocation()

I would like to check a visitors long/lat and check to see if it is in a certain state, or a certain radius from our physical location. I want to show certain content to specific people in a given range when they go to my site.

How would I go about doing this with getCurrentGeoLocation(). Are there NPM modules I could use or native javascript.

The googlemaps package would probably do this. There are also packages available for zip code queries I believe.

I’ll give it a try. Thank you.