@hyperfrontend/ui-utils/misc

misc

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

§function

simpleHash(input: string): string

Generates a simple hash code from a string input. Uses a basic hash algorithm suitable for non-cryptographic purposes.

Parameters

NameTypeDescription
§input
string
The string to hash

Returns

string
A 6-character alphanumeric hash string

Example

Generating simple hash

simpleHash('user@example.com')
// => 'a1b2c3'

simpleHash('hello world')
// => 'd4e5f6'