decord/source/modules/stickers/StickersSuggestionUtils.tsx

28 lines
895 B
TypeScript
Raw Normal View History

// Module ID: 5321
// Function ID: 5322
// Name: StickersSuggestionUtils
2026-07-23 10:11:24 +00:00
// Dependencies: [2]
2026-07-29 08:29:29 +00:00
// Exports: getQueriesFromUserInput, removePunctuation
2026-07-20 16:05:17 +00:00
// Module 5321 (StickersSuggestionUtils)
import size from "module_2" /* 2 */;
2026-08-24 06:08:38 +00:00
2026-07-23 10:11:24 +00:00
const re0 = /(!|\.|;|,|-|—|–|\?|"|')/g;
const re1 = /(\n|\t|\s)/g;
const result = size.fileFinishedImporting("modules/stickers/StickersSuggestionUtils.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export const removePunctuation = function removePunctuation(str) {
return str.replace(re0, "").replace(re1, " ");
2026-07-29 08:29:29 +00:00
};
export const getQueriesFromUserInput = function getQueriesFromUserInput(str) {
if (null == str) {
2026-07-20 16:05:17 +00:00
let items = [];
} else {
const str2 = str.replace(re0, "");
const str4 = str.replace(re0, "").replace(re1, " ");
items = str.replace(re0, "").replace(re1, " ").trim().split(" ");
const str5 = str.replace(re0, "").replace(re1, " ").trim();
2026-07-20 16:05:17 +00:00
}
return items;
};