• De-cycle an object to a JSON-safe representation

    Parameters

    • object: any

      The object to be decycled

    • Optionalreplacer: (value: any) => any

      A function that transforms the object before decycling

    Returns any

    The decycled object