(text: string)
| 183 | export function knownNames(sources: { galaxy?: GalaxyEvidence; texts: readonly string[]; names: readonly string[] }): (word: string) => boolean { |
| 184 | const words = new Set<string>(); |
| 185 | const add = (text: string) => { for (const word of text.match(/[\p{L}\p{N}_][\p{L}\p{N}_.-]*/gu) ?? []) words.add(word.toLowerCase()); }; |
| 186 | sources.texts.forEach(add); |
| 187 | const lastPart = (name: string) => (name.split(/[/.:]/).filter(Boolean).pop() ?? name).toLowerCase(); |
| 188 | sources.names.forEach(name => { words.add(name.toLowerCase()); words.add(lastPart(name)); }); |
nothing calls this directly
no outgoing calls
no test coverage detected