-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: isISO15924 #2215
base: master
Are you sure you want to change the base?
feat: isISO15924 #2215
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
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. |
There was a problem hiding this comment.
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?
src/lib/isISO15924.js
Outdated
@@ -0,0 +1,37 @@ | |||
import assertString from './util/assertString'; | |||
|
|||
// from https://en.wikipedia.org/wiki/ISO_15924 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 😅
I added the missing codes. The dataset is up to date now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
There was a problem hiding this comment.
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?
At FakerJS we would use this, to verify that our locale metadata have a valid "script" property (defined by ISO-15924) applied to them. Hope this applies for "real-world usage". |
Description
This PR adds the validator
isISO15924
to validate for correct ISO-15924 script codes.Additional Information
Closes #2214.
Checklist