-
Notifications
You must be signed in to change notification settings - Fork 4
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
strict mode for parsing numbers via regular expressions #7
base: master
Are you sure you want to change the base?
Conversation
…String()&input-manipulation
Codecov Report
@@ Coverage Diff @@
## master #7 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 1 1
Lines 57 76 +19
Branches 11 18 +7
=====================================
+ Hits 57 76 +19
Continue to review full report at Codecov.
|
I love that you referenced the CSS spec for the number token. You might hate me for saying this, but I think the complexity of parsing the number by itself might warrant an npm package of its own. Something that does nothing else but parse a number. This project parses a dimension, which could be a percent or something else, but the CSS spec you just referenced is for purely a number. |
well, if you would be willing to take the repo over, I could prepare one based on this one -- i.e. strip everything except for number-validation & rename etc |
I think I'm going to start a new project for just the number parsing. My schedule is pretty booked over the coming week though, so it might take a bit. |
no worries -- at least I am not in a hurry when you find the time, let me know when/if I can contribute something |
alternative approach to pr #6 that validates numbers directly using regular expressions (following the number-token grammar rule in CSS spec)