( maybeUrl )
| 42 | } |
| 43 | |
| 44 | export function isValidImageUrl ( maybeUrl ) { |
| 45 | if ( !isValidHttpUrl( maybeUrl ) ) return false |
| 46 | |
| 47 | // Check if url has a file extension |
| 48 | const url = new URL(maybeUrl) |
| 49 | const fileExtension = url.pathname.split('.').pop() |
| 50 | |
| 51 | return isNonEmptyString( fileExtension ) |
| 52 | } |
| 53 | |
| 54 | |
| 55 | export function isObject( maybeObject ) { |
nothing calls this directly
no test coverage detected