Skip to content

Commit

Permalink
[fix] Use .search to parse.
Browse files Browse the repository at this point in the history
[fix] Normalize `.search` to `.query`
  • Loading branch information
3rd-Eden committed Oct 17, 2014
1 parent 41eaf97 commit e0eca4c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,10 @@ var parse = 'undefined' !== typeof document ? function parse(url, qs) {
}

if (qs && 'string' === typeof data.query) {
data.query = querystring(data.query);
data.query = querystring(data.query || data.search);
}

data.query = data.query || data.search;
return data;
} : require('url').parse;

Expand Down
14 changes: 14 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,20 @@
"mocha": "1.21.x",
"pre-commit": "0.0.x"
},
"testling": {
"files": "test.js",
"harness": "mocha-bdd",
"browsers": [
"ie/6..latest",
"chrome/22..latest",
"firefox/16..latest",
"safari/latest",
"opera/11.0..latest",
"iphone/6",
"ipad/6",
"android-browser/latest"
]
},
"repository": {
"type": "git",
"url": "https://github.com/unshiftio/url-parse"
Expand Down

0 comments on commit e0eca4c

Please sign in to comment.