tiny-parse
Advanced tools
Comparing version 3.0.0 to 3.0.1
@@ -52,4 +52,4 @@ "use strict"; | ||
function parse (arg, coerce = true) { | ||
const uri = arg.url || arg || "", | ||
function parse (arg = "", coerce = true) { | ||
const uri = typeof arg === "string" ? arg : `http://${arg.headers.host || `localhost:${arg.socket.server._connectionKey.replace(/.*::/, "")}`}${arg.url}`, | ||
parsed = new URL(uri), | ||
@@ -56,0 +56,0 @@ result = {query: queryString(parsed, coerce)}; |
{ | ||
"name": "tiny-parse", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"description": "URL parsing with coercion of `query`", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4588