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

    Function jsonStringifySafe

    • Stringifies a value to JSON, handling circular references, Error objects, and BigInt values.

      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.

      Returns undefined | string

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