Build 589089stable
Module 973784
514 characters · in 514.d733764d42c2ab66.jsDependencies
Source Raw
function(e){"use strict";e.exports=function(e,t,n,r){t=t||"&",n=n||"=";var i={};if("string"!=typeof e||0===e.length)return i;var a=/\+/g;e=e.split(t);var o=1e3;r&&"number"==typeof r.maxKeys&&(o=r.maxKeys);var s=e.length;o>0&&s>o&&(s=o);for(var l=0;l<s;++l){var u,c,d,f,p=e[l].replace(a,"%20"),h=p.indexOf(n);(h>=0?(u=p.substr(0,h),c=p.substr(h+1)):(u=p,c=""),d=decodeURIComponent(u),f=decodeURIComponent(c),Object.prototype.hasOwnProperty.call(i,d))?Array.isArray(i[d])?i[d].push(f):i[d]=[i[d],f]:i[d]=f}return i}}