i18next-browser-languageDetector
i18next-browser-languageDetector copied to clipboard
Simplification of subdomain search
Checklist
- [x] only relevant code is changed (make a diff before you submit the PR)
- [x] run tests
npm run test - [x] tests are included
- [x] commit message and code follows the Developer's Certification of Origin
Checklist (for documentation change)
- [ ] only relevant documentation part is changed (make a diff before you submit the PR)
- [ ] motivation/reason is provided
- [ ] commit message and code follows the Developer's Certification of Origin
After thinking about it for a while, I wonder if a RegEx search is needed at all. The task of the subdomain detection is not to verify the domain view. The string "hostname" is already verified by the browser window.location. The detection should split the string and output the partial string by index (can be specified by the user). This is much faster and more robust with String.split.
What do you think?
lgtm, what about you @terhuerne ?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.