is-valid-geo-coordinates
v1.1.0
Published
Functions to check if geo coordinates values are valid
Downloads
12
Maintainers
Readme
is-valid-geo-coordinates
Functions to check if geo coordinates values are valid
Functions
isValidLatitude
Definition
Number => Boolean
Example
const { isValidLatitude } = require('is-valid-geo-coordinates');
isValidLatitude(10.233); // true
isValidLatitude(-110.233); // false
isValidLongitude
Definition
Number => Boolean
Example
const { isValidLongitude } = require('is-valid-geo-coordinates');
isValidLongitude(10.233); // true
isValidLongitude(-210.233); // false
isValidCoordinates
Definition
Number => Number => Boolean
Example
const { isValidCoordinates } = require('is-valid-geo-coordinates');
isValidCoordinates(10.233)(12.234); // true
isValidCoordinates(-110.213)(12.234); // false
isValidCoordinates(10.213)(-222.234); // false
isValidCoordinates(-2310.213)(-222.234); // false