validator.js icon indicating copy to clipboard operation
validator.js copied to clipboard

feat(isPalindrome): add isPalindrome validator

Open Tarun200999 opened this issue 3 years ago • 3 comments

This PR adds a validator which validates input string is Palindrome or not.

Valid Palindromes : '', 'A' , "NOON", "Wow" Invalid Palindromes : "AB" , "JAVASCRIPT"

Checklist

  • [x] PR contains only changes related; no stray files, etc.
  • [x] README updated (where applicable)
  • [x] Tests written (where applicable)

Tarun200999 avatar Feb 20 '22 14:02 Tarun200999

Codecov Report

Merging #1935 (c342c05) into master (c1b21a9) will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master     #1935   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          102       103    +1     
  Lines         2085      2092    +7     
  Branches       472       473    +1     
=========================================
+ Hits          2085      2092    +7     
Impacted Files Coverage Δ
src/index.js 100.00% <100.00%> (ø)
src/lib/isPalindrome.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update c1b21a9...c342c05. Read the comment docs.

codecov[bot] avatar Feb 20 '22 14:02 codecov[bot]

Not sure this has many use cases. Why would this be a good addition to this project?

WikiRik avatar Feb 20 '22 14:02 WikiRik

Not sure this has many use cases. Why would this be a good addition to this project?

I agree. In my opinion it's too much of an edge case if you're weighing package size, etc., against actual use.

bennetfabian avatar Mar 25 '22 00:03 bennetfabian

I also don't see any real use case for this, I can't think of any situation where you would want to validate e.g. in a form or similar, if a supplied string is a Palindrome or not

pano9000 avatar Dec 07 '22 12:12 pano9000

@profnandaa what is your opinion on that?

I would otherwise want to close this down

pano9000 avatar Jan 22 '23 23:01 pano9000

Sure, we can close this one. @Tarun200999 -- effort appreciated, please take a look at open issues and see which one else you can pick up.

profnandaa avatar Jan 23 '23 05:01 profnandaa