-
-
Notifications
You must be signed in to change notification settings - Fork 47
Add requireSchemeOrWww
option
#51
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
Add requireSchemeOrWww
option
#51
Conversation
The option name makes sense for the regex, but not here, as including www and protocol-less URLs is actually looser. I think it should be called |
I don't think it should apply there as it will be too ambiguous. |
@sindresorhus edited with comments |
Hmm, sorry, I missed that it also affects www, so the option should be |
Maybe also add a note that when it’s off it will match things like |
back to you @sindresorhus |
Can we give the user the hand to the list of the TLD ? For example, .onions are not captured using this. |
I actually added an issue to url-regex earlier for that exact request, although for a different reason: kevva/url-regex#65 Would be helpful to advocate your reason for wanting this there! With that in mind maybe it is better to just do #24 instead for maximum flexibility with less API surface, what do you think @sindresorhus ? |
@nestarz made a PR for that feature, which if passed in some form maybe can end up here too. kevva/url-regex#66 |
requireSchemeOrWww
option
No, I want to explicitly only expose options that make sense. |
Fixes #48
Fixes #24
Not sure how this ought to work with the
extractFromQueryString
param since I never use that - should it just forward the flag there?