2026-10-06 22:12:49 +00:00
|
|
|
|
// Module ID: 5583
|
|
|
|
|
|
// Function ID: 5584
|
2026-09-18 20:18:48 +00:00
|
|
|
|
// Name: StickersSuggestionUtils
|
|
|
|
|
|
// Dependencies: [2]
|
|
|
|
|
|
// Exports: getQueriesFromUserInput, removePunctuation
|
|
|
|
|
|
|
2026-10-06 22:12:49 +00:00
|
|
|
|
// Module 5583 (StickersSuggestionUtils)
|
2026-09-18 20:18:48 +00:00
|
|
|
|
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, " ");
|
2026-09-18 20:18:48 +00:00
|
|
|
|
};
|
|
|
|
|
|
export const getQueriesFromUserInput = function getQueriesFromUserInput(str) {
|
2026-10-06 22:12:49 +00:00
|
|
|
|
let items;
|
2026-09-18 20:18:48 +00:00
|
|
|
|
if (null == str) {
|
2026-10-06 22:12:49 +00:00
|
|
|
|
items = [];
|
2026-09-18 20:18:48 +00:00
|
|
|
|
} 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(" ");
|
2026-09-18 20:18:48 +00:00
|
|
|
|
}
|
|
|
|
|
|
return items;
|
|
|
|
|
|
};
|