Package Exports
- check-geographic-coordinates
- check-geographic-coordinates/dist/index.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
Verifies if geo coordinates are valid. 🌎 (longitude, latitude, both).
Install
npm install check-geographic-coordinates
//or
yarn add check-geographic-coordinatesUsage
const checkGeo = require("check-geographic-coordinates");
//ROME
const lon = 12.496366;
const lat = 41.902783;
//longitude, return true
checkGeo.longitude(lon); // also: isLongitude, isValidLongitude
//latitude, return true
checkGeo.latitude(lat); // also isLatitude, isValidLatitude
//cordinate, return true
checkGeo.coordinates(lon, lat); // also areCoordinates, areValidCoordinatesUsage with typescript
import { latitude, longitude, coordinates } from "check-geographic-coordinates";
//ROME
const lon = 12.496366;
const lat = 41.902783;
//longitude, return true
longitude(lon); // also: isLongitude, isValidLongitude
//latitude, return true
latitude(lat); // also isLatitude, isValidLatitude
//cordinate, return true
coordinates(lon, lat); // also areCoordinates, areValidCoordinatesTests
npm run test
//or
yarn test