-
Notifications
You must be signed in to change notification settings - Fork 9
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: add isGurmukhi function to check if string is Unicode Gurmukhi #141
Conversation
Need to add tests |
I'd suggest calling it |
ASCII is ASCII, it isn't Gurmukhi. There isn't a way to test if a string is from an ASCII Gurmukhi font, and if there was, English would also return true for such a function. |
The dandas are part of the Devanagari Unicode Block
Since this PR is closing #140, perhaps we can also fix toAscii function in this PR? |
@Harjot1Singh how would this be done? |
Something like that. I'm not sure if we'd want exhaustive enabled or not. |
Wouldn't it be better to fix |
Wouldn't this mean running some of |
There is no |
My bad, |
Sorry, I misread. Using isExtendedAscii/isGurmukhi would be fine in the line you said. However since |
If you use "some" instead of "every" in Edit: or rename func to |
This is why I believe and argue
|
That would still fail my use case. |
How so? Every keystroke can be run through |
Why is this issue being raised now? The functionality you have shown is expected. Input is supposed to be explicit, either Gurmukhi or ASCII. We agreed mixing would not be allowed. EDIT: This is reflected in the tests as well https://github.com/ShabadOS/gurmukhi-utils/blob/isGurmukhi/test/isGurmukhi.spec.js#L13 |
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.
Add an example to examples.js
too, as well as the example section at the top of README.hbs
, then good to go
Closes #140