(value: any, key: string)
| 157 | } |
| 158 | |
| 159 | export function validateBoolean(value: any, key: string) { |
| 160 | if (value === null || value === '') return true; |
| 161 | |
| 162 | if (typeof value !== 'boolean') { |
| 163 | throw new InvalidQueryError({ reason: `"${key}" has to be a boolean` }); |
| 164 | } |
| 165 | |
| 166 | return true; |
| 167 | } |
| 168 | |
| 169 | export function validateGeometry(value: any, key: string) { |
| 170 | if (value === null || value === '') return true; |
no outgoing calls
no test coverage detected