Hugging Face
Models
Datasets
Spaces
Posts
Docs
Solutions
Pricing
Log In
Sign Up
Spaces:
mithril-security
/
blind_chat
like
105
Runtime error
App
Files
Files
Community
1
d54ea4b
blind_chat
/
src
/
lib
/
utils
/
trimPrefix.ts
lauro1
test
faca43f
about 1 year ago
raw
Copy download link
history
blame
Safe
150 Bytes
export
function
trimPrefix
(
input:
string
, prefix:
string
) {
if
(input.
startsWith
(prefix)) {
return
input.
slice
(prefix.
length
);
}
return
input;
}