mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-05-22 13:32:11 +00:00
Squashed cherry-pick of PR #11811. Amp-Thread-ID: https://ampcode.com/threads/T-019df514-1f1c-7764-aa92-76b65210a74d Co-authored-by: Amp <amp@ampcode.com>
11 lines
489 B
TypeScript
11 lines
489 B
TypeScript
/**
|
|
* Build an opaque composite-key string from a tuple of values, suitable for
|
|
* use as a Map or Set key. Uses JSON.stringify so the encoding is injective
|
|
* across arbitrary string inputs (no separator collision possible). Keep the
|
|
* format opaque at consumer boundaries — do not parse it externally except
|
|
* in modules that own the round-trip (e.g. favoritedWidgetsStore).
|
|
*/
|
|
export function makeCompositeKey(parts: readonly unknown[]): string {
|
|
return JSON.stringify(parts)
|
|
}
|