xxhash-hasher.ts — astro Source File
Architecture documentation for xxhash-hasher.ts, a typescript file in the astro codebase. 3 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 6be6abed_4257_edcd_6c4a_de4522861bae["xxhash-hasher.ts"] e92fda44_4a5d_b83b_1a45_958cdae6c91b["./definitions.js"] 6be6abed_4257_edcd_6c4a_de4522861bae --> e92fda44_4a5d_b83b_1a45_958cdae6c91b aca757ac_dcac_a793_a9c5_394cd0d7d313["../utils.js"] 6be6abed_4257_edcd_6c4a_de4522861bae --> aca757ac_dcac_a793_a9c5_394cd0d7d313 46c7844d_546f_2371_dd75_3d1817368dd5["xxhash-wasm"] 6be6abed_4257_edcd_6c4a_de4522861bae --> 46c7844d_546f_2371_dd75_3d1817368dd5 style 6be6abed_4257_edcd_6c4a_de4522861bae fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import xxhash from 'xxhash-wasm';
import type { Hasher } from '../definitions.js';
import { sortObjectByKey } from '../utils.js';
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
Subdomains
Classes
Dependencies
- ../utils.js
- ./definitions.js
- xxhash-wasm
Source
Frequently Asked Questions
What does xxhash-hasher.ts do?
xxhash-hasher.ts is a source file in the astro codebase, written in typescript. It belongs to the CoreAstro domain, RenderingEngine subdomain.
What does xxhash-hasher.ts depend on?
xxhash-hasher.ts imports 3 module(s): ../utils.js, ./definitions.js, xxhash-wasm.
Where is xxhash-hasher.ts in the architecture?
xxhash-hasher.ts is located at packages/astro/src/assets/fonts/infra/xxhash-hasher.ts (domain: CoreAstro, subdomain: RenderingEngine, directory: packages/astro/src/assets/fonts/infra).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free