Package Exports
- check-geographic-coordinates
- check-geographic-coordinates/check-geographic-coordinates.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (check-geographic-coordinates) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Check geographic coordinates
Simple utility to check if geographic coordinates (latitute, longitude or both) are valid.
Install
npm install check-geographic-coordinatesor
yarn add check-geographic-coordinatesTests
npm run testor
yarn run testUsage
const checkGeo = require("check-geographic-coordinates");
checkGeo.longitude(180.0); // true
checkGeo.latitude(90.0); // true
checkGeo.coordinates(180, 90); // trueanother example:
const checkGeo = require("check-geographic-coordinates");
const ROME = { latitude: 41.902783, longitude: 12.496366 };
checkGeo.latitude(ROME.latitude); // true
checkGeo.longitude(ROME.longitude); //true
checkGeo.coordinates(ROME.longitude, ROME.latitude); //trueLicense
MIT