is_pelindrome
Version:
Check whether a string or number is a palindrome.
27 lines (17 loc) • 1.03 kB
Markdown
# is_palindrome
> Returns `true` if the given string or number is a palindrome. Ignores spaces, punctuation, and case.
[](https://www.npmjs.com/package/is-palindrome)
[](https://www.npmjs.com/package/is-palindrome)
[](https://www.npmjs.com/package/is-palindrome)
[](#)
---
## ✅ Installation
Install with npm:
```bash
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