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

Function hashContent

src/tools/semantic-search.ts:81–85  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

79}
80
81function hashContent(text: string): string {
82 let h = 0;
83 for (let i = 0; i < text.length; i++) h = ((h << 5) - h + text.charCodeAt(i)) | 0;
84 return h.toString(36);
85}
86
87function normalizeRelativePath(path: string): string {
88 return path.replace(/\\/g, "/");

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected