is-valid-coordinates
v1.0.0
Published
verifies if a given longitude and latitude are valid
Downloads
6,187
Maintainers
Readme
is-valid-coordinates
verifies if a given longitude and latitude are valid
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