diff --git a/index.js b/index.js index 19ab308..2cb9700 100644 --- a/index.js +++ b/index.js @@ -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]; }); diff --git a/package.json b/package.json index f4b24e5..b0a64ca 100644 --- a/package.json +++ b/package.json @@ -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": {