@ac-essentials/misc-util
    Preparing search index...

    Function jsonStringify

    • Stringify a value to a JSON string, handling circular references, Error objects, and BigInt values gracefully.

      Parameters

      • value: unknown

        The value to stringify.

      • Optionalreplacer: JsonReplacer

        A function that alters the behavior of the stringification process, or an array of String and Number objects that serve as a whitelist for selecting/filtering the properties of the value object to be included in the JSON string. If this value is null or not provided, all properties of the object are included in the resulting JSON string.

      • Optionalspace: string | number

        The number of spaces to use for indentation or a string to use as whitespace.

      • Optionaloptions: JsonMakeAllReplacersFunctionOptions

        Options to customize the behavior of the stringification, such as handling circular references.

      Returns string | undefined

      A JSON string representation of the value, or undefined if the value cannot be stringified.