Hugging Face
Models
Datasets
Spaces
Posts
Docs
Enterprise
Pricing
Log In
Sign Up
Spaces:
huggingfacejs
/
inference-widgets
like
11
Running
on
CPU Upgrade
App
Files
Files
Community
1
Fetching metadata from the HF Docker repository...
main
inference-widgets
/
packages
/
inference
/
src
/
lib
/
isUrl.ts
machineuser
Sync widgets demo
94753b6
about 1 year ago
raw
Copy download link
history
blame
contribute
delete
Safe
124 Bytes
export
function
isUrl
(
modelOrUrl:
string
):
boolean
{
return
/^http(s?):/
.
test
(modelOrUrl) || modelOrUrl.
startsWith
(
"/"
);
}