- Updated import statements in `textarea.tsx`, `toggle.tsx`, and `tooltip.tsx` for consistency. - Added missing semicolons and adjusted formatting in `use-mobile.ts` and `use-mobile.tsx`. - Cleaned up `package.json` and `root.json` files by removing unnecessary line breaks. - Simplified `turbo.json` by consolidating array formatting for better readability.
12 lines
292 B
TypeScript
12 lines
292 B
TypeScript
const FULL_TEXT_TOKEN_PATTERN = /[\p{L}\p{N}]+/gu;
|
|
|
|
export function buildBooleanFullTextQuery(search: string): string {
|
|
if (!search) {
|
|
return "";
|
|
}
|
|
|
|
const terms = search.normalize("NFKC").match(FULL_TEXT_TOKEN_PATTERN) ?? [];
|
|
|
|
return terms.map((term) => `+${term}*`).join(" ");
|
|
}
|