mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-25 09:43:49 +02:00
refactor store
This commit is contained in:
@@ -145,6 +145,23 @@ function replaceBioSymbols(text) {
|
||||
return newText.replace(/ {1,}/g, ' ').trimRight();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} text
|
||||
* @returns {string}
|
||||
*/
|
||||
function removeEmojis(text) {
|
||||
if (!text) {
|
||||
return '';
|
||||
}
|
||||
return text
|
||||
.replace(
|
||||
/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g,
|
||||
''
|
||||
)
|
||||
.replace(/\s+/g, ' ')
|
||||
.trim();
|
||||
}
|
||||
|
||||
export {
|
||||
escapeTag,
|
||||
escapeTagRecursive,
|
||||
@@ -152,5 +169,6 @@ export {
|
||||
commaNumber,
|
||||
localeIncludes,
|
||||
changeLogRemoveLinks,
|
||||
replaceBioSymbols
|
||||
replaceBioSymbols,
|
||||
removeEmojis
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user