MCPcopy Index your code
hub / github.com/forloopcodes/contextplus / hashContent

Function hashContent

src/tools/semantic-identifiers.ts:69–73  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

67let cachedIndex: IdentifierIndex | null = null;
68
69function hashContent(text: string): string {
70 let h = 0;
71 for (let i = 0; i < text.length; i++) h = ((h << 5) - h + text.charCodeAt(i)) | 0;
72 return h.toString(36);
73}
74
75function splitTerms(text: string): string[] {
76 return text

Callers 3

buildIdentifierIndexFunction · 0.70
rankCallSitesFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected