@aws-sdk/url-parser
Advanced tools
Comparing version 3.186.0 to 3.188.0
@@ -6,2 +6,10 @@ # Change Log | ||
# [3.188.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.187.0...v3.188.0) (2022-10-13) | ||
**Note:** Version bump only for package @aws-sdk/url-parser | ||
# [3.186.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.185.0...v3.186.0) (2022-10-06) | ||
@@ -8,0 +16,0 @@ |
import { parseQueryString } from "@aws-sdk/querystring-parser"; | ||
export var parseUrl = function (url) { | ||
export const parseUrl = (url) => { | ||
if (typeof url === 'string') { | ||
return parseUrl(new URL(url)); | ||
} | ||
var _a = url, hostname = _a.hostname, pathname = _a.pathname, port = _a.port, protocol = _a.protocol, search = _a.search; | ||
var query; | ||
const { hostname, pathname, port, protocol, search } = url; | ||
let query; | ||
if (search) { | ||
@@ -12,8 +12,8 @@ query = parseQueryString(search); | ||
return { | ||
hostname: hostname, | ||
hostname, | ||
port: port ? parseInt(port) : undefined, | ||
protocol: protocol, | ||
protocol, | ||
path: pathname, | ||
query: query, | ||
query, | ||
}; | ||
}; |
{ | ||
"name": "@aws-sdk/url-parser", | ||
"version": "3.186.0", | ||
"version": "3.188.0", | ||
"scripts": { | ||
@@ -23,4 +23,4 @@ "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", | ||
"dependencies": { | ||
"@aws-sdk/querystring-parser": "3.186.0", | ||
"@aws-sdk/types": "3.186.0", | ||
"@aws-sdk/querystring-parser": "3.188.0", | ||
"@aws-sdk/types": "3.188.0", | ||
"tslib": "^2.3.1" | ||
@@ -27,0 +27,0 @@ }, |
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
23759
+ Added@aws-sdk/querystring-parser@3.188.0(transitive)
+ Added@aws-sdk/types@3.188.0(transitive)
- Removed@aws-sdk/querystring-parser@3.186.0(transitive)
- Removed@aws-sdk/types@3.186.0(transitive)
Updated@aws-sdk/types@3.188.0