Skip to content
0

katanakit-js / hashKey

Function: hashKey() ​

ts
function hashKey(queryKey): string;

Defined in: node_modules/.bun/@tanstack+query-core@5.104.1/node_modules/@tanstack/query-core/build/modern/hydration-B9t5w6NC.d.ts:989

Default query & mutation keys hash function. Hashes the value into a stable hash.

Parameters ​

ParameterType
queryKeyreadonly unknown[]

Returns ​

string

Example ​

ts
// Object keys are sorted, so key order doesn't affect the hash:
hashKey(['todos', { page: 1, filter: 'done' }]) // === '["todos",{"filter":"done","page":1}]'

Released under the MIT License.