browserlocateme
v1.0.2
Published
Helps to get country,region,city,timezone from browser without ip apis dependency
Downloads
10
Maintainers
Readme
BrowserLocateMe
Determining a user's country based on geolocation data from the browser without relying on external IP APIs.
Usage:
import { getUserLocation } from "browserlocateme";
let deviceUser = getUserLocation();
console.log(deviceUser);
Output: {country:{code:"IN" ,name:"India"},region:"Asia",city:"Calcutta",timeZone:"IST"}
What problem does it resolve?
- Saves you from using an ip api to get user location info
What data you can expect ?
- Country with Code and name , region,city,timezone
What was the motivation ?
- Want to speed up my plugin without being dependent on api with an key required, imagine something native just to get the Country ?
What inaccurate ?
- Only City can be inaccurate