Use either toLowerCase or toLocaleLowerCase methods of the String object. The difference is that toLocaleLowerCase will take current locale of the user/host into account. As per § 18.104.22.168 of the ECMAScript Language Specification (ECMA-262) , toLocaleLowerCase… …works exactly the same as toLowerCase except that its result is intended to yield the correct result for the host environment’s current locale, rather than a locale-independent result. There will only be a difference in the few cases (such as Turkish) where the rules for that language conflict with the regular Unicode case mappings. Example:
consuming a plugin, and was confused why I was getting a "extension.tolowercase is not a function" JS error.
Which produced the error "extension.toLowerCase is not a function" So we tried this piece of code, which revealed the problem!