Module 973784

514 characters · in no known chunk
Dependencies
Required by (1)
Lazily required by (0)none
Requires (0)none
Lazily requires (0)none
Source Raw
function(e){"use strict";e.exports=function(e,t,n,i){t=t||"&",n=n||"=";var r={};if("string"!=typeof e||0===e.length)return r;var s=/\+/g;e=e.split(t);var a=1e3;i&&"number"==typeof i.maxKeys&&(a=i.maxKeys);var o=e.length;a>0&&o>a&&(o=a);for(var l=0;l<o;++l){var u,c,d,_,f=e[l].replace(s,"%20"),h=f.indexOf(n);(h>=0?(u=f.substr(0,h),c=f.substr(h+1)):(u=f,c=""),d=decodeURIComponent(u),_=decodeURIComponent(c),Object.prototype.hasOwnProperty.call(r,d))?Array.isArray(r[d])?r[d].push(_):r[d]=[r[d],_]:r[d]=_}return r}}