Created
November 1, 2019 06:25
-
-
Save wgao19/33845fddd5339b64d8474ac8f3efe7bc to your computer and use it in GitHub Desktop.
parse query
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
query && | |
query | |
.split('&') | |
.map(item => item.split('=')) | |
.some(([name, value]) => { | |
console.log('checking', name, value); | |
return name === 'callback' && value === '1'; | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment