Function equalsAnyIgnoreCase

  • Returns whether the given text equals to any of the comparison strings, case-insensitive

    Parameters

    • Optionaltext: null | string

      the source string to check

    • Optionalcomparisons: (undefined | null | string)[]

      the target strings to compare

    Returns boolean

    whether the given string equals to any of the comparison strings, case-insensitive

    equalsAnyIgnoreCase('foo', ['FOO', 'bar']);    // true