is_pelindrome
v1.0.8
Published
Check whether a string or number is a palindrome.
Downloads
42
Maintainers
Readme
is_palindrome
Returns
trueif the given string or number is a palindrome. Ignores spaces, punctuation, and case.
✅ Installation
Install with npm:
npm install --save is-palindrome
const isPalindrome = require('is_palindrome');
console.log(isPalindrome('madam')); // true
console.log(isPalindrome(121)); // true
console.log(isPalindrome('hello')); // false
console.log(isPalindrome('Was it a car or a cat I saw?')); // true
console.log(isPalindrome('No lemon, no melon')); // true