mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
remove falsy values, but do not limit characters
This commit is contained in:
parent
e2667a1a98
commit
a10916fc14
@ -33,7 +33,7 @@ const matchSomeWordsExactly = (str, boost = 2) => {
|
||||
const matchBeginningOfWords = (str) => {
|
||||
return str
|
||||
.split(' ')
|
||||
.filter((s) => s.length > 3)
|
||||
.filter((s) => s) // remove falsy values
|
||||
.map((s) => s + '*')
|
||||
.join(' ')
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user