@hyperfrontend/ui-utils/miscmisc
Miscellaneous UI helpers that don't fit a more specific module.
Currently exposes simpleHash, a small string-to-number hash used for stable ID generation, key derivation in lightweight caches, and any case where a non-cryptographic, deterministic numeric fingerprint of a string is enough.
API Reference
ƒ Functions
Generates a simple hash code from a string input. Uses a basic hash algorithm suitable for non-cryptographic purposes.
Parameters
| Name | Type | Description |
|---|---|---|
§input | string | The string to hash |
Returns
stringA 6-character alphanumeric hash string
Example
Generating simple hash
simpleHash('user@example.com')
// => 'a1b2c3'
simpleHash('hello world')
// => 'd4e5f6'