Skip to content

Instantly share code, notes, and snippets.

@wgao19
Created November 1, 2019 06:25
Show Gist options
  • Save wgao19/33845fddd5339b64d8474ac8f3efe7bc to your computer and use it in GitHub Desktop.
Save wgao19/33845fddd5339b64d8474ac8f3efe7bc to your computer and use it in GitHub Desktop.
parse query
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