{"action":"created","comment":{"url":"https://api.github.com/repos/ljharb/qs/pulls/comments/51765661","id":51765661,"diff_hunk":"@@ -132,7 +132,9 @@ exports.compact = function (obj, references) {\n         var compacted = [];\n \n         for (var i = 0; i < obj.length; ++i) {\n-            if (typeof obj[i] !== 'undefined') {\n+            if (Array.isArray(obj[i]) || Object.prototype.toString.call(obj[i]) === '[object Object]') {","path":"lib/utils.js","position":5,"original_position":5,"commit_id":"ce68f4977a032405eec4e8440ba24aceae8480d5","original_commit_id":"ce68f4977a032405eec4e8440ba24aceae8480d5","user":{"login":"ljharb","id":45469,"avatar_url":"https://avatars.githubusercontent.com/u/45469?v=3","gravatar_id":"","url":"https://api.github.com/users/ljharb","html_url":"https://github.com/ljharb","followers_url":"https://api.github.com/users/ljharb/followers","following_url":"https://api.github.com/users/ljharb/following{/other_user}","gists_url":"https://api.github.com/users/ljharb/gists{/gist_id}","starred_url":"https://api.github.com/users/ljharb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ljharb/subscriptions","organizations_url":"https://api.github.com/users/ljharb/orgs","repos_url":"https://api.github.com/users/ljharb/repos","events_url":"https://api.github.com/users/ljharb/events{/privacy}","received_events_url":"https://api.github.com/users/ljharb/received_events","type":"User","site_admin":false},"body":"i wonder tho if this might still be a simpler check to do `obj[i] && typeof obj[i] === 'object'` which would catch all non-function primitives?","created_at":"2016-02-03T18:36:07Z","updated_at":"2016-02-03T18:36:07Z","html_url":"https://github.com/ljharb/qs/pull/150#discussion_r51765661","pull_request_url":"https://api.github.com/repos/ljharb/qs/pulls/150","_links":{"self":{"href":"https://api.github.com/repos/ljharb/qs/pulls/comments/51765661"},"html":{"href":"https://github.com/ljharb/qs/pull/150#discussion_r51765661"},"pull_request":{"href":"https://api.github.com/repos/ljharb/qs/pulls/150"}}},"pull_request":{"url":"https://api.github.com/repos/ljharb/qs/pulls/150","id":57962361,"html_url":"https://github.com/ljharb/qs/pull/150","diff_url":"https://github.com/ljharb/qs/pull/150.diff","patch_url":"https://github.com/ljharb/qs/pull/150.patch","issue_url":"https://api.github.com/repos/ljharb/qs/issues/150","number":150,"state":"open","locked":false,"title":"Compacting nested sparse arrays","user":{"login":"tdzienniak","id":1304915,"avatar_url":"https://avatars.githubusercontent.com/u/1304915?v=3","gravatar_id":"","url":"https://api.github.com/users/tdzienniak","html_url":"https://github.com/tdzienniak","followers_url":"https://api.github.com/users/tdzienniak/followers","following_url":"https://api.github.com/users/tdzienniak/following{/other_user}","gists_url":"https://api.github.com/users/tdzienniak/gists{/gist_id}","starred_url":"https://api.github.com/users/tdzienniak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tdzienniak/subscriptions","organizations_url":"https://api.github.com/users/tdzienniak/orgs","repos_url":"https://api.github.com/users/tdzienniak/repos","events_url":"https://api.github.com/users/tdzienniak/events{/privacy}","received_events_url":"https://api.github.com/users/tdzienniak/received_events","type":"User","site_admin":false},"body":"Fix for #149 ","created_at":"2016-02-02T09:47:40Z","updated_at":"2016-02-03T18:36:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2c1bcc337447ed624cb99e930307bfd84092b0fe","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ljharb/qs/pulls/150/commits","review_comments_url":"https://api.github.com/repos/ljharb/qs/pulls/150/comments","review_comment_url":"https://api.github.com/repos/ljharb/qs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ljharb/qs/issues/150/comments","statuses_url":"https://api.github.com/repos/ljharb/qs/statuses/ce68f4977a032405eec4e8440ba24aceae8480d5","head":{"label":"tdzienniak:master","ref":"master","sha":"ce68f4977a032405eec4e8440ba24aceae8480d5","user":{"login":"tdzienniak","id":1304915,"avatar_url":"https://avatars.githubusercontent.com/u/1304915?v=3","gravatar_id":"","url":"https://api.github.com/users/tdzienniak","html_url":"https://github.com/tdzienniak","followers_url":"https://api.github.com/users/tdzienniak/followers","following_url":"https://api.github.com/users/tdzienniak/following{/other_user}","gists_url":"https://api.github.com/users/tdzienniak/gists{/gist_id}","starred_url":"https://api.github.com/users/tdzienniak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tdzienniak/subscriptions","organizations_url":"https://api.github.com/users/tdzienniak/orgs","repos_url":"https://api.github.com/users/tdzienniak/repos","events_url":"https://api.github.com/users/tdzienniak/events{/privacy}","received_events_url":"https://api.github.com/users/tdzienniak/received_events","type":"User","site_admin":false},"repo":{"id":50850835,"name":"qs","full_name":"tdzienniak/qs","owner":{"login":"tdzienniak","id":1304915,"avatar_url":"https://avatars.githubusercontent.com/u/1304915?v=3","gravatar_id":"","url":"https://api.github.com/users/tdzienniak","html_url":"https://github.com/tdzienniak","followers_url":"https://api.github.com/users/tdzienniak/followers","following_url":"https://api.github.com/users/tdzienniak/following{/other_user}","gists_url":"https://api.github.com/users/tdzienniak/gists{/gist_id}","starred_url":"https://api.github.com/users/tdzienniak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tdzienniak/subscriptions","organizations_url":"https://api.github.com/users/tdzienniak/orgs","repos_url":"https://api.github.com/users/tdzienniak/repos","events_url":"https://api.github.com/users/tdzienniak/events{/privacy}","received_events_url":"https://api.github.com/users/tdzienniak/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tdzienniak/qs","description":"A querystring parser with nesting support","fork":true,"url":"https://api.github.com/repos/tdzienniak/qs","forks_url":"https://api.github.com/repos/tdzienniak/qs/forks","keys_url":"https://api.github.com/repos/tdzienniak/qs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tdzienniak/qs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tdzienniak/qs/teams","hooks_url":"https://api.github.com/repos/tdzienniak/qs/hooks","issue_events_url":"https://api.github.com/repos/tdzienniak/qs/issues/events{/number}","events_url":"https://api.github.com/repos/tdzienniak/qs/events","assignees_url":"https://api.github.com/repos/tdzienniak/qs/assignees{/user}","branches_url":"https://api.github.com/repos/tdzienniak/qs/branches{/branch}","tags_url":"https://api.github.com/repos/tdzienniak/qs/tags","blobs_url":"https://api.github.com/repos/tdzienniak/qs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tdzienniak/qs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tdzienniak/qs/git/refs{/sha}","trees_url":"https://api.github.com/repos/tdzienniak/qs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tdzienniak/qs/statuses/{sha}","languages_url":"https://api.github.com/repos/tdzienniak/qs/languages","stargazers_url":"https://api.github.com/repos/tdzienniak/qs/stargazers","contributors_url":"https://api.github.com/repos/tdzienniak/qs/contributors","subscribers_url":"https://api.github.com/repos/tdzienniak/qs/subscribers","subscription_url":"https://api.github.com/repos/tdzienniak/qs/subscription","commits_url":"https://api.github.com/repos/tdzienniak/qs/commits{/sha}","git_commits_url":"https://api.github.com/repos/tdzienniak/qs/git/commits{/sha}","comments_url":"https://api.github.com/repos/tdzienniak/qs/comments{/number}","issue_comment_url":"https://api.github.com/repos/tdzienniak/qs/issues/comments{/number}","contents_url":"https://api.github.com/repos/tdzienniak/qs/contents/{+path}","compare_url":"https://api.github.com/repos/tdzienniak/qs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tdzienniak/qs/merges","archive_url":"https://api.github.com/repos/tdzienniak/qs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tdzienniak/qs/downloads","issues_url":"https://api.github.com/repos/tdzienniak/qs/issues{/number}","pulls_url":"https://api.github.com/repos/tdzienniak/qs/pulls{/number}","milestones_url":"https://api.github.com/repos/tdzienniak/qs/milestones{/number}","notifications_url":"https://api.github.com/repos/tdzienniak/qs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tdzienniak/qs/labels{/name}","releases_url":"https://api.github.com/repos/tdzienniak/qs/releases{/id}","deployments_url":"https://api.github.com/repos/tdzienniak/qs/deployments","created_at":"2016-02-01T16:01:01Z","updated_at":"2016-02-01T16:01:02Z","pushed_at":"2016-02-03T10:40:58Z","git_url":"git://github.com/tdzienniak/qs.git","ssh_url":"git@github.com:tdzienniak/qs.git","clone_url":"https://github.com/tdzienniak/qs.git","svn_url":"https://github.com/tdzienniak/qs","homepage":"","size":233,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ljharb:master","ref":"master","sha":"c8857a08892824e7ffeff7dc65ad3d9417329455","user":{"login":"ljharb","id":45469,"avatar_url":"https://avatars.githubusercontent.com/u/45469?v=3","gravatar_id":"","url":"https://api.github.com/users/ljharb","html_url":"https://github.com/ljharb","followers_url":"https://api.github.com/users/ljharb/followers","following_url":"https://api.github.com/users/ljharb/following{/other_user}","gists_url":"https://api.github.com/users/ljharb/gists{/gist_id}","starred_url":"https://api.github.com/users/ljharb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ljharb/subscriptions","organizations_url":"https://api.github.com/users/ljharb/orgs","repos_url":"https://api.github.com/users/ljharb/repos","events_url":"https://api.github.com/users/ljharb/events{/privacy}","received_events_url":"https://api.github.com/users/ljharb/received_events","type":"User","site_admin":false},"repo":{"id":22266795,"name":"qs","full_name":"ljharb/qs","owner":{"login":"ljharb","id":45469,"avatar_url":"https://avatars.githubusercontent.com/u/45469?v=3","gravatar_id":"","url":"https://api.github.com/users/ljharb","html_url":"https://github.com/ljharb","followers_url":"https://api.github.com/users/ljharb/followers","following_url":"https://api.github.com/users/ljharb/following{/other_user}","gists_url":"https://api.github.com/users/ljharb/gists{/gist_id}","starred_url":"https://api.github.com/users/ljharb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ljharb/subscriptions","organizations_url":"https://api.github.com/users/ljharb/orgs","repos_url":"https://api.github.com/users/ljharb/repos","events_url":"https://api.github.com/users/ljharb/events{/privacy}","received_events_url":"https://api.github.com/users/ljharb/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ljharb/qs","description":"A querystring parser with nesting support","fork":false,"url":"https://api.github.com/repos/ljharb/qs","forks_url":"https://api.github.com/repos/ljharb/qs/forks","keys_url":"https://api.github.com/repos/ljharb/qs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ljharb/qs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ljharb/qs/teams","hooks_url":"https://api.github.com/repos/ljharb/qs/hooks","issue_events_url":"https://api.github.com/repos/ljharb/qs/issues/events{/number}","events_url":"https://api.github.com/repos/ljharb/qs/events","assignees_url":"https://api.github.com/repos/ljharb/qs/assignees{/user}","branches_url":"https://api.github.com/repos/ljharb/qs/branches{/branch}","tags_url":"https://api.github.com/repos/ljharb/qs/tags","blobs_url":"https://api.github.com/repos/ljharb/qs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ljharb/qs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ljharb/qs/git/refs{/sha}","trees_url":"https://api.github.com/repos/ljharb/qs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ljharb/qs/statuses/{sha}","languages_url":"https://api.github.com/repos/ljharb/qs/languages","stargazers_url":"https://api.github.com/repos/ljharb/qs/stargazers","contributors_url":"https://api.github.com/repos/ljharb/qs/contributors","subscribers_url":"https://api.github.com/repos/ljharb/qs/subscribers","subscription_url":"https://api.github.com/repos/ljharb/qs/subscription","commits_url":"https://api.github.com/repos/ljharb/qs/commits{/sha}","git_commits_url":"https://api.github.com/repos/ljharb/qs/git/commits{/sha}","comments_url":"https://api.github.com/repos/ljharb/qs/comments{/number}","issue_comment_url":"https://api.github.com/repos/ljharb/qs/issues/comments{/number}","contents_url":"https://api.github.com/repos/ljharb/qs/contents/{+path}","compare_url":"https://api.github.com/repos/ljharb/qs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ljharb/qs/merges","archive_url":"https://api.github.com/repos/ljharb/qs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ljharb/qs/downloads","issues_url":"https://api.github.com/repos/ljharb/qs/issues{/number}","pulls_url":"https://api.github.com/repos/ljharb/qs/pulls{/number}","milestones_url":"https://api.github.com/repos/ljharb/qs/milestones{/number}","notifications_url":"https://api.github.com/repos/ljharb/qs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ljharb/qs/labels{/name}","releases_url":"https://api.github.com/repos/ljharb/qs/releases{/id}","deployments_url":"https://api.github.com/repos/ljharb/qs/deployments","created_at":"2014-07-25T18:35:41Z","updated_at":"2016-02-02T15:32:03Z","pushed_at":"2016-02-03T17:27:38Z","git_url":"git://github.com/ljharb/qs.git","ssh_url":"git@github.com:ljharb/qs.git","clone_url":"https://github.com/ljharb/qs.git","svn_url":"https://github.com/ljharb/qs","homepage":"","size":366,"stargazers_count":470,"watchers_count":470,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":67,"mirror_url":null,"open_issues_count":12,"forks":67,"open_issues":12,"watchers":470,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ljharb/qs/pulls/150"},"html":{"href":"https://github.com/ljharb/qs/pull/150"},"issue":{"href":"https://api.github.com/repos/ljharb/qs/issues/150"},"comments":{"href":"https://api.github.com/repos/ljharb/qs/issues/150/comments"},"review_comments":{"href":"https://api.github.com/repos/ljharb/qs/pulls/150/comments"},"review_comment":{"href":"https://api.github.com/repos/ljharb/qs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ljharb/qs/pulls/150/commits"},"statuses":{"href":"https://api.github.com/repos/ljharb/qs/statuses/ce68f4977a032405eec4e8440ba24aceae8480d5"}}}}