• Parameters

    • str: undefined | null | string

      Function to check if an input is empty

    Returns boolean

    true if the input is null, undefined, or consisted only of whitespace characters, false otherwise

    isNullOrEmpty(''); // true
    isNullOrEmpty(' '); // true
    isNullOrEmpty('abc'); // false