function qs(search) { if(typeof search !== "string" || !search) return search; return search.split("&").reduce((res, cur) => { const arr = cur.split("="); return Object.assign({[arr[0]]: arr[1]}, res) }, {}) }