Library API
    Preparing search index...

    Function nullishToEmpty

    • Returns the value if defined, otherwise an empty string.

      Type Parameters

      • T

      Parameters

      • obj: T

        The value to check

      Returns "" | NonNullable<T>

      The value or an empty string

      const val = nullishToEmpty(undefined); // ''