const url = new URL('http://example.com/?foo=bar'); const params = new URLSearchParams(url.search); params.get('foo') # -> "bar"
牌語備忘録 -pygo
const url = new URL('http://example.com/?foo=bar'); const params = new URLSearchParams(url.search); params.get('foo') # -> "bar"