Thanks for taking the time to make a pull-request. I added a few test cases for the isHex method and I have mostly reverted the code changes to isHex. It will now be case insensitive as your pull-request was intending. The problem with using a regular expression as you did, is that it will return true for strings like "12345" which is technically a valid hexadecimal string, but the purpose of isHex is to differentiate between real hexadecimal strings and numbers that are of type string.
Thanks for taking the time to make a pull-request. I added a few test cases for the isHex method and I have mostly reverted the code changes to isHex. It will now be case insensitive as your pull-request was intending. The problem with using a regular expression as you did, is that it will return true for strings like "12345" which is technically a valid hexadecimal string, but the purpose of isHex is to differentiate between real hexadecimal strings and numbers that are of type string.