Skip to content
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

Case insensitivity implemented - by storing key in lower case #64

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

PandaWood
Copy link

@PandaWood PandaWood commented Feb 9, 2017

I stored the key as lower case, to avoid adding a load of toLowerCase statements - though I still needed a few.
I tried using a case-insensitive regex but it fails one important test that deals with encoding, so toLowerCase it is
I've also removed forEach - it's time to let go - I'll understand if you don't want this. But I'll keep it on my fork

These commits need to be squashed, only the last implements the idea of storing the key lower case

@derek-watson
Copy link
Owner

@PandaWood sorry it has taken so long to address this - are you still interested in discussing? There are some aspects of the spec that assuming case insensitivity violates, and so I'm wondering if we can do a constructor switch or something.

@PandaWood
Copy link
Author

Hi @derek-watson ,
Right, I suppose a constructor arg might be the only way then, although probably be a little awkward
eg something like new Uri({nocase: true}, url).getQueryParam('bob')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants