@stephen-shopopop/node-metrics
    Preparing search index...

    Function safeJsonParse

    • Safely parses a JSON string, returning the parsed object if successful, or the original string if parsing fails.

      Parameters

      • data: string

        The string to parse as JSON.

      Returns any

      The parsed object if data is valid JSON, otherwise returns the original string.