@types/fast-stable-stringify
v1.0.0
Published
TypeScript definitions for fast-stable-stringify
Readme
Installation
npm install --save @types/fast-stable-stringify
Summary
This package contains type definitions for fast-stable-stringify (https://github.com/nickyout/fast-stable-stringify).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/fast-stable-stringify.
index.d.ts
/**
* Deterministic JSON.stringify() - outputs the same string regardless of key
* insertion order by sorting object keys alphabetically.
*
* @param val - The value to stringify
* @returns A JSON string representation, or undefined if the value cannot be stringified
*
* @example
* ```javascript
* const stringify = require('fast-stable-stringify');
* const obj = { c: 8, b: [{ z: 6, y: 5, x: 4 }, 7], a: 3 };
* console.log(stringify(obj));
* // Output: {"a":3,"b":[{"x":4,"y":5,"z":6},7],"c":8}
* ```
*/
declare function stringify(val: unknown): string | undefined;
export = stringify;
Additional Details
- Last updated: Wed, 04 Feb 2026 21:07:21 GMT
- Dependencies: none
Credits
These definitions were written by gaspard.
