JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 163
  • Score
    100M100P100Q86576F
  • License MIT

Verify if geographic coordinates are valid 🌎 (latitude, longitude, both).

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).

node-current (tag) npm version npm type definitions NPM

Install

npm install check-geographic-coordinates
//or
yarn add check-geographic-coordinates

Usage

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, areValidCoordinates

Usage 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, areValidCoordinates

Tests

npm run test
//or
yarn test

Feedback

https://github.com/verdecchia