Skip to content

Latest commit

 

History

History
33 lines (27 loc) · 516 Bytes

README.md

File metadata and controls

33 lines (27 loc) · 516 Bytes

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
}
*/