web4more / html-navigator

Navigator api for node.js
https://npmjs.com/package/node-navigator
MIT License
3 stars 0 forks source link

Node Navigator

Node.js navigator api

Installing

$ npm install --save node-navigator

Example

const { Navigator } = require("node-navigator");
const navigator = new Navigator();

navigator.geolocation.getCurrentPosition((success, error) => {
    if (error) console.error(error);
    else console.log(success);
});

/*
{
  accuracy: null,
  altitude: null,
  altitudeAccuracy: null,
  heading: null,
  latitude: 69.6969,
  longitude: 69.6969,
  speed: null,
  timestamp: 1609918525820
}
*/