javascript includes() case insensitive
You can create a RegExp from filterstrings
first
var filterstrings = ['firststring','secondstring','thridstring'];
var regex = new RegExp( filterstrings.join( "|" ), "i");
then test
if the passedinstring
is there
var isAvailable = regex.test( passedinstring );
You can simply convert the passedinstring to lowercase.
var passedinstring = localStorage.getItem("passedinstring").toLowerCase();