(content: string)
| 27 | * Same content always produces the same key across server restarts. |
| 28 | */ |
| 29 | export function contentHash(content: string): string { |
| 30 | return createHash("sha256").update(content).digest("hex").slice(0, 16); |
| 31 | } |
| 32 | |
| 33 | function draftPath(key: string): string { |
| 34 | return join(getDraftDir(), `${key}.json`); |
no test coverage detected