check if string contains list of substrings javascript