Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4791.js (118.4 MB)
27 lines
895 B
TypeScript
27 lines
895 B
TypeScript
// Module ID: 5321
|
||
// Function ID: 5322
|
||
// Name: StickersSuggestionUtils
|
||
// Dependencies: [2]
|
||
// Exports: getQueriesFromUserInput, removePunctuation
|
||
|
||
// Module 5321 (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) {
|
||
return str.replace(re0, "").replace(re1, " ");
|
||
};
|
||
export const getQueriesFromUserInput = function getQueriesFromUserInput(str) {
|
||
if (null == str) {
|
||
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();
|
||
}
|
||
return items;
|
||
};
|