Commit 1cd2768d authored by Jamie Tanna's avatar Jamie Tanna
Browse files

fixup! Add the ability to specify a parameter for query/fragment parsing

parent d1e892d3
Pipeline #123327913 failed with stage
in 7 minutes and 47 seconds
......@@ -35,5 +35,6 @@ Also note that yes, this should be received by your browser, not by some Node co
And for a handy one-liner, which will let you optionally specify the parameter to display:
```sh
$ echo 'https://example.com/auth/callback#code=foo&state=blah' | node -r querystring -r url -e 'q = querystring.parse(url.parse(fs.readFileSync("/dev/stdin", "utf-8")).hash.replace("#", ""));console.log((process.argv.slice(0)[1]) ? (q[process.argv.slice(0)[1]] || "") : JSON.stringify(q, null, 4));'
# note the required use of `--` at the end!
$ echo 'https://example.com/auth/callback#code=foo&state=blah' | node -r querystring -r url -e 'q = querystring.parse(url.parse(fs.readFileSync("/dev/stdin", "utf-8")).hash.replace("#", ""));console.log((process.argv.slice(0)[1]) ? (q[process.argv.slice(0)[1]] || "") : JSON.stringify(q, null, 4));' -- code
```
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment