XxhashHasher Class — astro Architecture
Architecture documentation for the XxhashHasher class in xxhash-hasher.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 0f9bd0db_ee3c_b0f6_33fb_14d36fe86661["XxhashHasher"] 6be6abed_4257_edcd_6c4a_de4522861bae["xxhash-hasher.ts"] 0f9bd0db_ee3c_b0f6_33fb_14d36fe86661 -->|defined in| 6be6abed_4257_edcd_6c4a_de4522861bae 5be37831_870e_fba0_74d3_82f26138ad45["constructor()"] 0f9bd0db_ee3c_b0f6_33fb_14d36fe86661 -->|method| 5be37831_870e_fba0_74d3_82f26138ad45 b2008b6d_da2d_3e6c_4966_74611fa44e4e["create()"] 0f9bd0db_ee3c_b0f6_33fb_14d36fe86661 -->|method| b2008b6d_da2d_3e6c_4966_74611fa44e4e 185c2d09_0ee8_077f_4391_1e9b4562aa0f["hashObject()"] 0f9bd0db_ee3c_b0f6_33fb_14d36fe86661 -->|method| 185c2d09_0ee8_077f_4391_1e9b4562aa0f
Relationship Graph
Source Code
packages/astro/src/assets/fonts/infra/xxhash-hasher.ts lines 5–20
export class XxhashHasher implements Hasher {
hashString: (input: string) => string;
private constructor(hashString: (input: string) => string) {
this.hashString = hashString;
}
static async create() {
const { h64ToString } = await xxhash();
return new XxhashHasher(h64ToString);
}
hashObject(input: Record<string, any>): string {
return this.hashString(JSON.stringify(sortObjectByKey(input)));
}
}
Domain
Source
Frequently Asked Questions
What is the XxhashHasher class?
XxhashHasher is a class in the astro codebase, defined in packages/astro/src/assets/fonts/infra/xxhash-hasher.ts.
Where is XxhashHasher defined?
XxhashHasher is defined in packages/astro/src/assets/fonts/infra/xxhash-hasher.ts at line 5.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free