(raw: string)
| 6 | |
| 7 | /** Pull searchable word tokens out of free text (alphanumerics + underscore, length ≥ 2). PURE. */ |
| 8 | export function factTokens(raw: string): string[] { |
| 9 | return (raw.toLowerCase().match(/[\p{L}\p{N}_]{2,}/gu) ?? []); |
| 10 | } |
| 11 | |
| 12 | /** De-dupe preserving order. */ |
| 13 | function dedupe(xs: string[]): string[] { |
no outgoing calls
no test coverage detected