Skip to content
This repository has been archived by the owner on Mar 14, 2020. It is now read-only.

Commit

Permalink
change to es5
Browse files Browse the repository at this point in the history
  • Loading branch information
vrgamespace committed Jul 7, 2017
1 parent 319c200 commit 8e9fdb4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
* @return {object}
*/
function anyQs(url) {
let params = {};
let tempArr = decodeURI(url)
var params = {},
tempArr = decodeURI(url)
.replace(/\+/g, ' ')
.match(/\w+=[^&#?\/]+/g);
if (!tempArr) {
return {};
}
tempArr.forEach(function (item) {
let ps = item.split('=');
var ps = item.split('=');
params[ps[0]] = /^\d+(\.\d+)?$/.test(ps[1]) ? parseFloat(ps[1]) : ps[1];
});

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "any-qs",
"version": "1.0.3",
"version": "1.0.4",
"description": "parse any query parameters from url",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 8e9fdb4

Please sign in to comment.