-
Notifications
You must be signed in to change notification settings - Fork 960
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
Use query-string instead of qs #171
Conversation
|
||
function isNestedObject(object) { | ||
for (var p in object) | ||
if (typeof object[p] === 'object') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do you want to handle arrays and null
here? query-string handles them just fine (though stringified differently from qs in both cases).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like it handles those sanely. This is just a developer convenience warning, so they're aware we're not looking to handle nested queries. I wouldn't try to go overboard on supporting a bunch of edge cases here. I think they'll figure it out when they see %5Bobject+Object%5D
in their URLs 😄
@mjackson Feel free to smash that commit. I don't know how you like your commit history. I'm more of a multiple-commit kind of dude, but you may want it clean. |
@timdorr Regarding your line comment that got eaten, what I meant was we should probably not warn in those cases, because |
Duh, because arrays are typeof object. I always forget that. Let me amend that commit then. |
f392434
to
9277c51
Compare
Arrays and |
But |
D'oh. Let's squash and merge this then. |
Fixes #121