@luband/jstools
Version:
前端工具包
2 lines (1 loc) • 392 B
JavaScript
function o(o){var t;void 0===o&&(o=window.location.href);var e=null===(t=/.+\?(.+)$/.exec(o))||void 0===t?void 0:t[1];if(e){var r=e.split("&"),a={};return r.forEach((function(o){if(/=/.test(o)){var t=o.split("="),e=t[0],r=t[1];r=decodeURIComponent(r);var n=/^\d+$/.test(r)?parseFloat(r):r;a.hasOwnProperty(e)?a[e]=[].concat(a[e],n):a[e]=n}else a[o]=void 0})),a}return{}}export{o as default};