source:
node_modules/@reduxjs/toolkit/src/query/utils/isValidUrl.ts
| Last change on this file was a762898, checked in by , 5 months ago | |
|---|---|
|
|
| File size: 127 bytes | |
| Rev | Line | |
|---|---|---|
| [a762898] | 1 | export function isValidUrl(string: string) { |
| 2 | try { | |
| 3 | new URL(string) | |
| 4 | } catch (_) { | |
| 5 | return false | |
| 6 | } | |
| 7 | ||
| 8 | return true | |
| 9 | } |
Note:
See TracBrowser
for help on using the repository browser.
