browserlocateme

1.0.2 • Public • Published

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

Package Sidebar

Install

npm i browserlocateme

Weekly Downloads

1

Version

1.0.2

License

ISC

Unpacked Size

160 kB

Total Files

3

Last publish

Collaborators

  • mrniamster