Skip to content

Instantly share code, notes, and snippets.

View bigeyex's full-sized avatar

Yu Wang bigeyex

  • ByteDance
  • Beijing, China
View GitHub Profile
@sofish
sofish / urlparser.js
Last active March 18, 2021 11:31
URL Parser
var parser = function(url) {
var a = document.createElement('a');
a.href = url;
var search = function(search) {
if(!search) return {};
var ret = {};
search = search.slice(1).split('&');
for(var i = 0, arr; i < search.length; i++) {