{"action":"created","issue":{"url":"https://api.github.com/repos/aurelia/path/issues/14","labels_url":"https://api.github.com/repos/aurelia/path/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/aurelia/path/issues/14/comments","events_url":"https://api.github.com/repos/aurelia/path/issues/14/events","html_url":"https://github.com/aurelia/path/issues/14","id":125506784,"number":14,"title":"Query string parameters gets sorted","user":{"login":"CasiOo","id":5333676,"avatar_url":"https://avatars.githubusercontent.com/u/5333676?v=3","gravatar_id":"","url":"https://api.github.com/users/CasiOo","html_url":"https://github.com/CasiOo","followers_url":"https://api.github.com/users/CasiOo/followers","following_url":"https://api.github.com/users/CasiOo/following{/other_user}","gists_url":"https://api.github.com/users/CasiOo/gists{/gist_id}","starred_url":"https://api.github.com/users/CasiOo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CasiOo/subscriptions","organizations_url":"https://api.github.com/users/CasiOo/orgs","repos_url":"https://api.github.com/users/CasiOo/repos","events_url":"https://api.github.com/users/CasiOo/events{/privacy}","received_events_url":"https://api.github.com/users/CasiOo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-01-07T23:15:16Z","updated_at":"2016-01-22T05:48:00Z","closed_at":null,"body":"This isn't a bug, but what's the reasoning behind sorting the query string parameters when building it?\r\nhttps://github.com/aurelia/path/blob/master/src/index.js#L118\r\n\r\nSorting them seems unnecessary to me. Is it just to make any test case happy? `Object.keys` return the keys in arbitrary order, so are they just sorted to make the assertions in tests easier to implement?\r\n\r\nA guy in chat had a scenario, where he wanted to control the parameter ordering. He wanted the search query key to come first `q=some-search`. This should be possible, if the keys weren't being sorted. Usually the browsers will return the keys in the order they were declared on the object like:\r\n```\r\n//b will be printed before a\r\nvar obj = {b:1, a:2, c:3};\r\n    \r\nfor (var prop in obj) {\r\n  console.log(\"obj.\" + prop + \" = \" + obj[prop]);\r\n}\r\n```\r\nI know you can't count on the browsers to act this way given the documentation."},"comment":{"url":"https://api.github.com/repos/aurelia/path/issues/comments/173819471","html_url":"https://github.com/aurelia/path/issues/14#issuecomment-173819471","issue_url":"https://api.github.com/repos/aurelia/path/issues/14","id":173819471,"user":{"login":"zenbaku","id":529110,"avatar_url":"https://avatars.githubusercontent.com/u/529110?v=3","gravatar_id":"","url":"https://api.github.com/users/zenbaku","html_url":"https://github.com/zenbaku","followers_url":"https://api.github.com/users/zenbaku/followers","following_url":"https://api.github.com/users/zenbaku/following{/other_user}","gists_url":"https://api.github.com/users/zenbaku/gists{/gist_id}","starred_url":"https://api.github.com/users/zenbaku/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zenbaku/subscriptions","organizations_url":"https://api.github.com/users/zenbaku/orgs","repos_url":"https://api.github.com/users/zenbaku/repos","events_url":"https://api.github.com/users/zenbaku/events{/privacy}","received_events_url":"https://api.github.com/users/zenbaku/received_events","type":"User","site_admin":false},"created_at":"2016-01-22T05:48:00Z","updated_at":"2016-01-22T05:48:00Z","body":"One reason I can come up for query parameters sorting is browser caching. I don't know if it applies in this specific context, but it is usually a good practice."}}