MCPcopy Create free account
hub / github.com/ClydeTime/Surge / stringify

Method stringify

Script/BiliBili/Mine.js:206–206  ·  view source on GitHub ↗
(s=this.json)

Source from the content-addressed store, hash-verified

204
205// https://github.com/DualSubs/URL/blob/main/URLs.embedded.min.js
206function URLs(s){return new class{constructor(s=[]){this.name="URL v1.0.2",this.opts=s,this.json={scheme:"",host:"",path:"",params:{}}}parse(s){let t=s.match(/(?<scheme>.+):\/\/(?<host>[^/]+)\/?(?<path>[^?]+)?\??(?<params>.*)?/)?.groups??null;return t?.path||(t.path=""),t?.params&&(t.params=Object.fromEntries(t.params.split("&").map((s=>s.split("="))))),t}stringify(s=this.json){return s?.params?s.scheme+"://"+s.host+"/"+s.path+"?"+Object.entries(s.params).map((s=>s.join("="))).join("&"):s.scheme+"://"+s.host+"/"+s.path}}(s)}
207
208/**
209 * Get Environment Variables

Callers 15

toStrMethod · 0.45
setItemMethod · 0.45
toStrMethod · 0.45
setItemMethod · 0.45
Mine.jsFile · 0.45
setENVFunction · 0.45
toStrMethod · 0.45
setjsonMethod · 0.45
writedataMethod · 0.45
setdataMethod · 0.45
queryStrMethod · 0.45
GetCookieFunction · 0.45

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected