(url: string)
| 253 | * @param url the model url to be parsed. |
| 254 | */ |
| 255 | export function parseUrl(url: string): [string, string] { |
| 256 | const lastSlash = url.lastIndexOf('/'); |
| 257 | const lastSearchParam = url.lastIndexOf('?'); |
| 258 | const prefix = url.substring(0, lastSlash); |
| 259 | const suffix = |
| 260 | lastSearchParam > lastSlash ? url.substring(lastSearchParam) : ''; |
| 261 | return [prefix + '/', suffix]; |
| 262 | } |
| 263 | |
| 264 | export function isHTTPScheme(url: string): boolean { |
| 265 | return url.match(HTTPRequest.URL_SCHEME_REGEX) != null; |
no outgoing calls
no test coverage detected
searching dependent graphs…