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

Function hashContent

src/core/embeddings.ts:310–314  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

308}
309
310function hashContent(text: string): string {
311 let h = 0;
312 for (let i = 0; i < text.length; i++) h = ((h << 5) - h + text.charCodeAt(i)) | 0;
313 return h.toString(36);
314}
315
316function cosine(a: number[], b: number[]): number {
317 let dot = 0, normA = 0, normB = 0;

Callers 1

indexMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected