Skip to content

Instantly share code, notes, and snippets.

@deguchi
Last active February 24, 2023 01:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deguchi/c767ee11aaeb1e2b93d56f528d3ca4fe to your computer and use it in GitHub Desktop.
Save deguchi/c767ee11aaeb1e2b93d56f528d3ca4fe to your computer and use it in GitHub Desktop.
const getQueryString = () => {
const params = {}
location.search.substring(1).split('&').forEach((param) => {
const [key, value] = param.split('=')
// @ts-ignore
params[key] = decodeURIComponent(value)
})
return params
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment