• Better Version of JSON.stringify() that is able to save undefined, NaN, Infinity, and -Infinity values.

    Parameters

    • value: any

      A JavaScript value, usually an object or array, to be converted (with undefined, NaN, Infinity, and -Infinity values allowed).

    • OptionalkeepUndefined: boolean

      Whether or not to include undefined variables when stringifying, defaults to false.

    • Optionalspace: string | number

      Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.

    Returns string

    The JSON string.