(content: string)
| 64 | const DEFAULT_COALESCE_MS = 300; |
| 65 | |
| 66 | export 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 | |
| 75 | export function createEmptyEditHistory(_options?: EditHistoryOptions): EditHistoryState { |
| 76 | return { |
no outgoing calls
no test coverage detected