refactor(search): improve encoder function formatting

- Updated the encoder function to use consistent arrow function syntax for better readability.
This commit is contained in:
Amir Pourmand 2025-08-28 11:38:38 +03:30
parent 46b383df7f
commit 3451bebb20

View File

@ -16,12 +16,11 @@ interface Item {
type SearchType = "basic" | "tags"
let searchType: SearchType = "basic"
let currentSearchTerm: string = ""
// Encoder text
const encoder = (str: string) => {
return str
.toLowerCase()
.split(/\s+/)
.filter(token => token.length > 0)
.filter((token) => token.length > 0)
}
let index = new FlexSearch.Document<Item>({