refactor store

This commit is contained in:
pa
2026-03-06 22:42:43 +09:00
parent e665b3815d
commit 8ddedb2d2d
29 changed files with 3269 additions and 888 deletions

View File

@@ -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
};