You can create a RegExp from filterstrings first

var filterstrings = ['firststring','secondstring','thirdstring'];
var regex = new RegExp( filterstrings.join( "|" ), "i");

then test if the passedinstring is there

var isAvailable = regex.test( passedinstring );

Here is a test implementation:

// Take care to escape these strings!
// If they are user-input or may contain special regex characters (such as "$" or "."), they have to be escaped.
var filterStrings = ['one','two','three'];
var regex = new RegExp(filterStrings.join( "|" ), "i");

var sentences = [
  "one", // true
  "OnE", // true
  "a rabbit", // false
  "and then two rabbits", // true
  "standing", // false
  "prone", // true
  "AoNeAtWo", // true
];
sentences.forEach(sentence => {
  console.log(
    regex.test(sentence) ? ' match:' : ' not a match:',
    "'" + sentence + "'",
    );
});

Answer from gurvinder372 on Stack Overflow
🌐
Bobby Hadz
bobbyhadz.com › blog › javascript-includes-case-insensitive
Make includes() case insensitive in JavaScript | bobbyhadz
To make the String.includes() method case insensitive, convert both of the strings in the comparison to lowercase.
🌐
GeeksforGeeks
geeksforgeeks.org › javascript › how-to-make-array-indexof-case-insensitive-in-javascript
JavaScript- Make Array.indexOf() Case Insensitive - GeeksforGeeks
July 12, 2025 - To make Array.findIndex() case insensitive in JavaScript using RegExp, create a regular expression with the `i` flag (ignores case).
🌐
Codedamn
codedamn.com › news › javascript
JavaScript includes method for String and Array with Examples
June 2, 2023 - However, you can make it case-insensitive with the help of toLowerCase() or toUpperCase() methods. Convert both the main string and the substring to lower or upper case before using includes(). const sentence = "Welcome to codedamn!"; const ...
🌐
Devsheet
devsheet.com › check-if-array-includes-stringcase-insensitive-javascript
Check if Array includes String(Case Insensitive) Javascript - Devsheet
We will be using the Array.map() and toLowercase() functions to convert all the values of our array to lowercase and then using the indexOf() function we are checking if a string is included in an array ignoring case sensitivity.
🌐
30 Seconds of Code
30secondsofcode.org › home › javascript › string › case-insensitive substring search
Can I check if a JavaScript string contains a substring, regardless of case? - 30 seconds of code
May 25, 2024 - const includesCaseInsensitive = (str, searchString) => new RegExp(searchString, 'i').test(str); includesCaseInsensitive('Blue Whale', 'blue'); // true ... Let's have a look at how to check if a string contains a substring in JavaScript. ... Use a regular expression to check if a string contains only alpha or alphanumeric characters in JavaScript. ... Here's a quick tip on how to compare and sort arrays of strings, ignoring case and accents.
Find elsewhere
🌐
Medium
medium.com › @onlinemsr › javascript-includes-the-top-10-things-you-need-to-know-3e59d88b9d09
JavaScript Includes(): The Top 10 Things You Need to Know | by Raja MSR | Medium
July 2, 2023 - JavaScript includes() function with arrays · Search within string using includes() function · How to use includes() with objects · Search using includes() function with regular expression · How to use includes() in case insensitive manner · Use multiple conditions with includes() Comparing includes() with contains() and indexOf() methods ·
🌐
Linux Hint
linuxhint.com › make-includes-case-insensitive-in-javascript
Make includes() Case Insensitive in JavaScript
Linux Hint LLC, [email protected] 1210 Kelly Park Circle, Morgan Hill, CA 95037 Privacy Policy and Terms of Use
🌐
Mastering JS
masteringjs.io › tutorials › fundamentals › contains-substring
Check if a String Contains a Substring in JavaScript - Mastering JS
Both String#includes() and String#indexOf() are case sensitive. Neither function supports regular expressions. To do case insensitive search, you can use regular expressions and the String#match() function, or you can convert both the string ...
🌐
SheCodes
shecodes.io › athena › 37854-how-to-ignore-case-in-javascript
[JavaScript] - How to ignore case in JavaScript? - SheCodes | SheCodes
Learn how to perform case-insensitive comparisons in JavaScript using toLowerCase(), toUpperCase(), and regular expressions with the i flag.
🌐
GitHub
github.com › lodash › lodash › issues › 3370
Need case insensitive search option in "includes" function. · Issue #3370 · lodash/lodash
June 9, 2017 - When comparing string with "includes" function can we have an option to make the search case insensitive?
Published   Sep 14, 2017
🌐
Excessivelyadequate
excessivelyadequate.com › posts › mark.html
Case-insensitive Search Term Highlighting With JavaScript
Now onto issue 2 (i.e., filling in the correctly-cased variant of the match in each <mark> tag). Having switched to splitting by a regular expression instead of a plain string just so happens to help resolve this one, too, since String.split(RegExp) will include any capturing groups at odd indices of the resulting array.
🌐
ReqBin
reqbin.com › code › javascript › vt6ttbek › javascript-array-contains-example
How do I check if an array contains an element in JavaScript?
JavaScript Array Contains Example ... the find(), case insensitive, you can convert all elements in the array and the target element to lowercase (or uppercase) before comparing them:...
🌐
Javascripts
javascripts.com › perform-case-insensitive-includes-in-javascript
How to Perform Case-Insensitive Includes in JavaScript
June 23, 2023 - If the lowercase version of targetStr does exist within the lowercase version of mainStr, the includes() method returns true – indicating that mainStr does include targetStr, ignoring case. If it doesn’t, it returns false. The result is stored in the variable isIncludes and then logged to the console. This way, we can perform a case-insensitive includes check in JavaScript.