UNPKG

web-utils-super

Version:

前端函数库

12 lines (10 loc) 304 B
/** * @desc: 判断纬度 -90.0~+90.0(整数部分为0~90,必须输入1到6位小数) * @param {Number} value * @return {Boolean} */ function isLatitude(value) { const reg = /^[-|+]?([0-8]?\d{1}\.\d{1,6}|90\.0{1,6})$/; return reg.test(value); } module.exports = isLatitude;