JS ciąg startswith ignoruj ​​przypadek

let name = "FoOOBaAr"
let match = "fOO"

if (name.toLowerCase().startsWith(match.toLowerCase())) {....
Wide-eyed Fox