Download api/lib/utils/misc.js from Zhitomir/chat: direct link, hf CLI and curl.
- Browser
- Download file 365 Bytes
-
https://huggingface.co/spaces/Zhitomir/chat/resolve/main/api/lib/utils/misc.js
- Command line
-
hf download hf://spaces/Zhitomir/chat/api/lib/utils/misc.js
-
curl -L -o misc.js https://huggingface.co/spaces/Zhitomir/chat/resolve/main/api/lib/utils/misc.js
365 Bytes
| const cleanUpPrimaryKeyValue = (value) => { | |
| // For Bing convoId handling | |
| return value.replace(/--/g, '|'); | |
| }; | |
| function replaceSup(text) { | |
| if (!text.includes('<sup>')) { | |
| return text; | |
| } | |
| const replacedText = text.replace(/<sup>/g, '^').replace(/\s+<\/sup>/g, '^'); | |
| return replacedText; | |
| } | |
| module.exports = { | |
| cleanUpPrimaryKeyValue, | |
| replaceSup, | |
| }; | |