MCPcopy Index your code
hub / github.com/Linen-dev/linen.dev / toKeywords

Function toKeywords

packages/llm/src/typesense.ts:13–20  ·  view source on GitHub ↗
(query: string)

Source from the content-addressed store, hash-verified

11const FILTERED_WORDS = ['the', 'me', 'I', 'a', 'an', 'is', 'how', 'what'];
12
13export function toKeywords(query: string) {
14 return query
15 .replace(/!|\?/g, '')
16 .split(/\s+/g)
17 .filter((word) => !FILTERED_WORDS.includes(word))
18 .map((word) => word.toLocaleLowerCase())
19 .join(' ');
20}
21
22export default class Typesense {
23 @measure

Callers 2

queryThreadsMethod · 0.85
typesense.test.tsFile · 0.85

Calls 1

mapMethod · 0.80

Tested by

no test coverage detected