ts-playground
    Preparing search index...

    Function errorToNaN

    • Wraps a function to return NaN if it throws an error

      Parameters

      • fn: NumericFunction

        The function to wrap

      Returns NumericFunction

      A new function that returns NaN if the original function throws an error