1.4.0 • Published 1 year ago

@arcteryx/js-geolocation v1.4.0

Weekly downloads
51
License
ISC
Repository
-
Last release
1 year ago

Arc'teryx Geolocation Library

ARCTERYX JavaScript library to get the geolocation for a user by calling the /api/geolocation from the edge in Fastly. It will save the geoLocation information in localStorage under "geolocation" key. It will return the geoLocation from localStorage if it exists. If it's been stored in localStorage for more than 1hr it will fetch it again and store it.

Usage

npm install @arcteryx/js-geolocation

const geoLocation = await getGeolocation();

geoLocation =  {
  city: "vancouver",
  region: "BC",
  country_code: "CA",
  country_name: "canada",
  postalcode: "v5y 1e6",
  latitude: "49.270",
  longitude: "-123.110",
  saveAt: "2020-12-17T11:42:12.803Z"
}

Build and test locally

npm ci
npm run build
1.4.0

1 year ago

1.4.0-gamma.0

1 year ago

1.4.0-ts2.0

1 year ago

1.4.0-test.0

1 year ago

1.4.0-ts.0

1 year ago

1.4.0-alpha.0

1 year ago

1.3.1-alpha.0

1 year ago

1.3.0

3 years ago

1.2.0

4 years ago

1.2.1

4 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago