mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
ensure 3 characters minimum
This commit is contained in:
parent
c88cbdc9d8
commit
9198ec9a12
@ -33,7 +33,7 @@ const matchSomeWordsExactly = (str, boost = 2) => {
|
||||
const matchBeginningOfWords = (str) => {
|
||||
return str
|
||||
.split(' ')
|
||||
.filter((s) => s) // remove falsy values
|
||||
.filter((s) => s.length >= 3)
|
||||
.map((s) => s + '*')
|
||||
.join(' ')
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user