Last active
June 8, 2016 01:00
-
-
Save tag1216/b3bf40e4a56882a8f2c4a1829e51961c to your computer and use it in GitHub Desktop.
ES2015でリクエストパラメータのパース
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
var params = new Map( | |
location.search | |
.replace(/^\?/, "") | |
.split('&') | |
.filter(d => d) | |
.map(d => d.split('=')) | |
); | |
params.get("param1") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment