UNPKG

astro

Version:

Astro is a modern site builder with web best practices, performance, and DX front-of-mind.

15 lines (14 loc) 327 B
import xxhash from "xxhash-wasm"; import { sortObjectByKey } from "../utils.js"; async function createXxHasher() { const { h64ToString: hashString } = await xxhash(); return { hashString, hashObject(input) { return hashString(JSON.stringify(sortObjectByKey(input))); } }; } export { createXxHasher };