refactor(server)*: tsconfigs (#2689)
* refactor(server): tsconfigs * chore: dummy commit * fix: start.sh * chore: restore original entry scripts
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import { isNumberInRange } from '../numbers';
|
||||
|
||||
export function parseLatitude(input: string | number): number | null {
|
||||
const latitude = typeof input === 'string' ? Number.parseFloat(input) : input;
|
||||
|
||||
if (isNumberInRange(latitude, -90, 90)) {
|
||||
return latitude;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
export function parseLongitude(input: string | number): number | null {
|
||||
const longitude = typeof input === 'string' ? Number.parseFloat(input) : input;
|
||||
|
||||
if (isNumberInRange(longitude, -180, 180)) {
|
||||
return longitude;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
Reference in New Issue
Block a user