MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / hashEditHistoryContent

Function hashEditHistoryContent

packages/studio/src/utils/editHistory.ts:66–73  ·  view source on GitHub ↗
(content: string)

Source from the content-addressed store, hash-verified

64const DEFAULT_COALESCE_MS = 300;
65
66export function hashEditHistoryContent(content: string): string {
67 let hash = 2166136261;
68 for (let index = 0; index < content.length; index += 1) {
69 hash ^= content.charCodeAt(index);
70 hash = Math.imul(hash, 16777619);
71 }
72 return (hash >>> 0).toString(16).padStart(8, "0");
73}
74
75export function createEmptyEditHistory(_options?: EditHistoryOptions): EditHistoryState {
76 return {

Callers 3

readCurrentFileHashesFunction · 0.90
buildEditHistoryEntryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected