feat: isISO15924 by xDivisionByZerox · Pull Request #2215 · validatorjs/validator.js
Description
This PR adds the validator isISO15924 to validate for correct ISO-15924 script codes.
Additional Information
Closes #2214.
Checklist
- PR contains only changes related; no stray files, etc.
- README updated (where applicable)
- Tests written (where applicable)
- References provided in PR (where applicable)
Codecov Report
All modified and coverable lines are covered by tests ✅
Project coverage is 99.95%. Comparing base (
b958bd7) to head (deb7c40).
Report is 67 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@ ## master #2215 +/- ## ======================================= Coverage 99.95% 99.95% ======================================= Files 107 108 +1 Lines 2454 2456 +2 Branches 619 620 +1 ======================================= + Hits 2453 2455 +2 Partials 1 1
☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.
🚀 New features to boost your workflow:
- ❄ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for opening up this PR! Overall it looks good. I wrote down one small suggestion.
Also; I did also notice new codes were added in the meantime. Could you add them as well?
| @@ -0,0 +1,37 @@ | |||
| import assertString from './util/assertString'; | |||
|
|
|||
| // from https://en.wikipedia.org/wiki/ISO_15924 | |||
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // from https://en.wikipedia.org/wiki/ISO_15924 | |
| // from https://www.unicode.org/iso15924/iso15924-codes.html |
Personally I prefer linking to the more official links instead of Wikipedia. It's fine in the README where more context is useful, but for the actual code this is better for me.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure thing. I'm completly with you here. I think I was a bit lazy when I created this PR 😅
Also; I did also notice new codes were added in the meantime. Could you add them as well?
I added the missing codes. The dataset is up to date now.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contrib.
However, I'm trying to understand this feature. What would be an example of real-world usage?
I don't want to be pushy, but could I get an update if this PR is considered to be merged into the lib? 😅
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters