@thumbmarkjs/thumbmarkjs
Version:
   • 713 B
TypeScript
/**
* Stable JSON stringify implementation
* Based on fast-json-stable-stringify by Evgeny Poberezkin
* https://github.com/epoberezkin/fast-json-stable-stringify
*
* This implementation ensures consistent JSON serialization by sorting object keys,
* which is critical for generating stable hashes from fingerprint data.
*/
/**
* Converts data to a stable JSON string with sorted keys
*
* @param data - The data to stringify
* @returns Stable JSON string representation
* @throws TypeError if circular reference is detected
*
* @example
* ```typescript
* const obj = { b: 2, a: 1 };
* stableStringify(obj); // '{"a":1,"b":2}'
* ```
*/
export declare function stableStringify(data: any): string;