/is-valid-coordinates

verifies if a given longitude and latitude are valid

Primary LanguageJavaScriptISC LicenseISC

is-valid-coordinates

verifies if a given longitude and latitude are valid


Build StatusCode Coverage 100%ISC LicenseNodeJS

JavaScript Style Guide

api

const isValidCoordinates = require('is-valid-coordinates')

all methods should return a boolean value

isValidCoordinates(longitude, latitude)

isValidCoordinates.longitude(longitude)

isValidCoordinates.latitude(latitude)

example

const isValidCoordinates = require('is-valid-coordinates')

const lon = -8.945406
const lat = 38.575078

isValidCoordinates(lon, lat)// returns true
isValidCoordinates.longitude(lon)// returns true
isValidCoordinates.latitude(lat)// returns true

ISC License (ISC)