Function nullishToEmptyMap

Converts a nullish Map to an empty Map

  • Type Parameters

    • M

      The type of Map keys

    • N

      The type of Map values

    Parameters

    • Optionalvalue: null | Map<M, N>

      The Map value to check (optional or null)

    Returns Map<M, N>

    The original Map if it exists, otherwise an empty Map