Поиск подстроки без учета регистра

const includesCaseInsensitive = (str, searchString) =>
  new RegExp(searchString, 'i').test(str);
includesCaseInsensitive('Blue Whale', 'blue'); // true
Текст и строки JavaScript