A JavaScript module to calculate string in order to find palindromes