redux-query-sync
redux-query-sync copied to clipboard
Case insensitive matches
Hello!
Firstly, thank you for working on this! It's coming in very handy.
I have a question of sorts. I know that per RFC rules, querystrings are case sensitive.
However, in specific use cases, it would be useful to configure the enhancer params matching to be case insensitive. In my particular case, I'm in the process of migrating from pascal case to lower case and wanted the params to match both cases.
If you're open to the idea, I would be happy to submit a PR.
I would probably just specify stringToValue: s => s.toLowerCase() for every parameter; would that solve the problem? Or is the problem that you consider it too cumbersome to repeat that line for every parameter?
Oh wait, I am talking about values; you are talking about parameter names; sorry. :)
In that case, perhaps that would be a valid request indeed.
Yeah 😄
I meant case insensitive query string keys. So that param p matched both P and p in the url.
Cool! As soon as I have hour or so I'll submit a PR 👍