word length limitation set to minimum 2

This commit is contained in:
Ulf Gebhardt 2023-04-25 12:01:10 +02:00
parent 9198ec9a12
commit c2828a31de
Signed by: ulfgebhardt
GPG Key ID: DA6B843E748679C9
2 changed files with 2 additions and 2 deletions

View File

@ -33,7 +33,7 @@ const matchSomeWordsExactly = (str, boost = 2) => {
const matchBeginningOfWords = (str) => {
return str
.split(' ')
.filter((s) => s.length >= 3)
.filter((s) => s.length >= 2)
.map((s) => s + '*')
.join(' ')
}

View File

@ -37,7 +37,7 @@ describe('queryString', () => {
describe('globbing for longer words', () => {
it('globs words with more than three characters', () => {
expect(queryString('a couple of words')).toContain('couple* words*')
expect(queryString('a couple of words')).toContain('couple* of* words*')
})
})
})