decord/stable/source/modules/stickers/StickersSuggestionUtils.tsx
2026-10-06 22:12:49 +00:00

29 lines
826 B
TypeScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Module ID: 5583
// Function ID: 5584
// Name: StickersSuggestionUtils
// Dependencies: [2]
// Exports: getQueriesFromUserInput, removePunctuation
// 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) {
str = str.replace(re0, "");
return str.replace(re1, " ");
};
export const getQueriesFromUserInput = function getQueriesFromUserInput(str) {
let items;
if (null == str) {
items = [];
} else {
const str2 = str.replace(re0, "");
const str4 = str2.replace(re1, " ");
const str5 = str4.trim();
items = str5.split(" ");
}
return items;
};