dat-palindrome-doe
determine if given string is a palindrome or not
configure the algorithm with custom options. the default configuration is this (merged with custom configs when provided)
const defaultConfig = // first deal with special cases (assessed before validation of input) value === 0 || value === '' !value || value === true // then validate input typeof value === "string" || typeof value === "number" // algorithm functions /^[a-z0-9]+$/i // isAlphaNumeric !!a && !!b && a === b // leftEqualsRightWhenBothLowercase
usage with default configs
const isPalidrome = console // true
usage with custom configs
const isPalidrome = !!a && !!b && a === b // case-senstitive comparatorconsole // false