decord/stable/source/modules/stickers/StickersSuggestionUtils.tsx

30 lines
826 B
TypeScript
Raw Permalink Normal View History

2026-10-06 22:12:49 +00:00
// Module ID: 5583
// Function ID: 5584
// Name: StickersSuggestionUtils
// Dependencies: [2]
// Exports: getQueriesFromUserInput, removePunctuation
2026-10-06 22:12:49 +00:00
// Module 5583 (StickersSuggestionUtils)
import size from "module_2" /* 2 */;
const re0 = /(!|\.|;|,|-|—|–|\?|"|')/g;
const re1 = /(\n|\t|\s)/g;
const result = size.fileFinishedImporting("modules/stickers/StickersSuggestionUtils.tsx");
export const removePunctuation = function removePunctuation(str) {
2026-10-06 22:12:49 +00:00
str = str.replace(re0, "");
return str.replace(re1, " ");
};
export const getQueriesFromUserInput = function getQueriesFromUserInput(str) {
2026-10-06 22:12:49 +00:00
let items;
if (null == str) {
2026-10-06 22:12:49 +00:00
items = [];
} else {
const str2 = str.replace(re0, "");
2026-10-06 22:12:49 +00:00
const str4 = str2.replace(re1, " ");
const str5 = str4.trim();
items = str5.split(" ");
}
return items;
};