Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

is-coordinates

Zertz6.8kMIT2.0.2

Determines if an array contains a valid set of numbers for representing latitude and longitude coordinates

coordinates, latitude, longitude

readme

is-coordinates Build Status npm version

Determines if an array contains a valid set of numbers for representing latitude and longitude coordinates

Install

$ npm install --save is-coordinates

Usage

const isCoordinates = require('is-coordinates')

isCoordinates([45.266486, -72.147989])
// yep

isCoordinates('unicorns')
// nope

API

isCoordinates(input, [options])

input

Type: array

Coordinates.

options

validate

Type: boolean
Default: false

Validate range (-180/180, -90/90)

License

MIT © 2016 Pier-Luc Gendreau