Created
July 9, 2019 16:49
-
-
Save kirpalmakanga/16a601dcb0d64794c4e9ae0c8a84eac6 to your computer and use it in GitHub Desktop.
Get URL Params
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const getUrlParams = (url) => { | |
const { searchParams } = new URL(url); | |
return Object.fromEntries([...searchParams.entries()]); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment