Created
October 26, 2021 06:02
-
-
Save nilsandrey/17ca60d305ffdea8026443701c5a7aba to your computer and use it in GitHub Desktop.
Return the value of an expected query string parameter. Return `null` if not present.
This file contains 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
export function qsParam(name) { | |
return new URLSearchParams(document.location.search).get(name); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment