Hugging Face
Models
Datasets
Spaces
Posts
Docs
Enterprise
Pricing
Log In
Sign Up
Spaces:
Duplicated from
huggingchat/chat-ui
unbrandedhuman
/
DUET
like
0
Runtime error
App
Files
Files
Community
Fetching metadata from the HF Docker repository...
main
DUET
/
src
/
lib
/
utils
/
trimSuffix.ts
unbrandedhuman
Upload 83 files
1e95ed5
over 1 year ago
raw
Copy download link
history
blame
contribute
delete
Safe
165 Bytes
export
function
trimSuffix
(
input:
string
, end:
string
):
string
{
if
(input.
endsWith
(end)) {
return
input.
slice
(
0
, input.
length
- end.
length
);
}
return
input;
}