h3 0.3.8 → 0.3.9

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.
package/dist/index.cjs CHANGED
@@ -595,7 +595,7 @@ function createHandle(stack, options) {
595
595
  if (!reqUrl.startsWith(layer.route)) {
596
596
  continue;
597
597
  }
598
- req.url = reqUrl.substr(layer.route.length) || "/";
598
+ req.url = reqUrl.slice(layer.route.length) || "/";
599
599
  } else {
600
600
  req.url = reqUrl;
601
601
  }
@@ -629,7 +629,7 @@ function normalizeLayer(layer) {
629
629
  layer.promisify = layer.handle.length > 2;
630
630
  }
631
631
  return {
632
- route: withoutTrailingSlash(layer.route).toLocaleLowerCase(),
632
+ route: withoutTrailingSlash(layer.route),
633
633
  match: layer.match,
634
634
  handle: layer.lazy ? lazyHandle(layer.handle, layer.promisify) : layer.promisify ? promisifyHandle(layer.handle) : layer.handle
635
635
  };
package/dist/index.d.ts CHANGED
@@ -73,8 +73,8 @@ declare class H3Error extends Error {
73
73
  */
74
74
  declare function createError(input: Partial<H3Error>): H3Error;
75
75
  /**
76
- * Recieve an error and return the corresponding response.<br>
77
- * H3 internally uses this fucntion to handle unhandled errors.<br>
76
+ * Receive an error and return the corresponding response.<br>
77
+ * H3 internally uses this function to handle unhandled errors.<br>
78
78
  * Note that calling this function will close the connection and no other data will be sent to client afterwards.
79
79
  *
80
80
  * @param res {ServerResponse} The ServerResponse object is passed as the second parameter in the handler function
package/dist/index.mjs CHANGED
@@ -591,7 +591,7 @@ function createHandle(stack, options) {
591
591
  if (!reqUrl.startsWith(layer.route)) {
592
592
  continue;
593
593
  }
594
- req.url = reqUrl.substr(layer.route.length) || "/";
594
+ req.url = reqUrl.slice(layer.route.length) || "/";
595
595
  } else {
596
596
  req.url = reqUrl;
597
597
  }
@@ -625,7 +625,7 @@ function normalizeLayer(layer) {
625
625
  layer.promisify = layer.handle.length > 2;
626
626
  }
627
627
  return {
628
- route: withoutTrailingSlash(layer.route).toLocaleLowerCase(),
628
+ route: withoutTrailingSlash(layer.route),
629
629
  match: layer.match,
630
630
  handle: layer.lazy ? lazyHandle(layer.handle, layer.promisify) : layer.promisify ? promisifyHandle(layer.handle) : layer.handle
631
631
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "h3",
3
- "version": "0.3.8",
3
+ "version": "0.3.9",
4
4
  "description": "Tiny JavaScript Server",
5
5
  "repository": "unjs/h3",
6
6
  "license": "MIT",