@momsfriendlydevco/cowboy 1.0.9 → 1.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/request.js +8 -0
  2. package/package.json +1 -1
package/lib/request.js CHANGED
@@ -16,6 +16,13 @@ export default class CowboyRequest {
16
16
  hostname;
17
17
 
18
18
 
19
+ /**
20
+ * Extracted URL query parameters
21
+ * @type {Object}
22
+ */
23
+ query = {};
24
+
25
+
19
26
  constructor(cfReq, props) {
20
27
  // Copy all cfReq keys locally as a shallow copy
21
28
  Object.assign(
@@ -35,6 +42,7 @@ export default class CowboyRequest {
35
42
  let url = new URL(cfReq.url);
36
43
  this.path = this.pathTidy(url.pathname);
37
44
  this.hostname = url.hostname;
45
+ this.query = Object.fromEntries(url.searchParams);
38
46
  }
39
47
 
40
48
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momsfriendlydevco/cowboy",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
4
4
  "description": "Wrapper around Cloudflare Wrangler to provide a more Express-like experience",
5
5
  "scripts": {
6
6
  "lint": "eslint ."