Created
August 20, 2018 16:41
-
-
Save pilgreen/b83c116421d05a27188e47e95a305c01 to your computer and use it in GitHub Desktop.
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
function getParam(key, q) { | |
let pair = new RegExp(key + "=([^&#]*)"); | |
let match = q.match(pair); | |
return match ? match[1] : ''; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment