Hugging Face
Models
Datasets
Spaces
Posts
Docs
Enterprise
Pricing
Log In
Sign Up
Spaces:
dcrey7
/
test
like
0
Sleeping
App
Files
Files
Community
Fetching metadata from the HF Docker repository...
main
test
/
clone
/
node_modules
/
axios
/
lib
/
helpers
/
parseProtocol.js
dcrey7
Upload 522 files
811126d
verified
3 months ago
raw
Copy download link
history
blame
contribute
delete
Safe
151 Bytes
'use strict'
;
export
default
function
parseProtocol
(
url
) {
const
match =
/^([-+\w]{1,25})(:?\/\/|:)/
.
exec
(url);
return
match && match[
1
] ||
''
;
}