Hugging Face
Models
Datasets
Spaces
Posts
Docs
Solutions
Pricing
Log In
Sign Up
Spaces:
mithril-security
/
blind_chat
like
105
Running
App
Files
Files
Community
1
main
blind_chat
/
src
/
lib
/
utils
/
trimSuffix.ts
lauro1
test
faca43f
11 months ago
raw
Copy download link
history
blame
contribute
delete
No virus
165 Bytes
export
function
trimSuffix
(
input:
string
, end:
string
):
string
{
if
(input.
endsWith
(end)) {
return
input.
slice
(
0
, input.
length
- end.
length
);
}
return
input;
}