@aws-sdk/url-parser
Advanced tools
Comparing version
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.parseUrl = void 0; | ||
const querystring_parser_1 = require("@aws-sdk/querystring-parser"); | ||
const parseUrl = (url) => { | ||
if (typeof url === "string") { | ||
return (0, exports.parseUrl)(new URL(url)); | ||
} | ||
const { hostname, pathname, port, protocol, search } = url; | ||
let query; | ||
if (search) { | ||
query = (0, querystring_parser_1.parseQueryString)(search); | ||
} | ||
return { | ||
hostname, | ||
port: port ? parseInt(port) : undefined, | ||
protocol, | ||
path: pathname, | ||
query, | ||
}; | ||
}; | ||
exports.parseUrl = parseUrl; | ||
const tslib_1 = require("tslib"); | ||
tslib_1.__exportStar(require("@smithy/url-parser"), exports); |
@@ -1,18 +0,1 @@ | ||
import { parseQueryString } from "@aws-sdk/querystring-parser"; | ||
export const parseUrl = (url) => { | ||
if (typeof url === "string") { | ||
return parseUrl(new URL(url)); | ||
} | ||
const { hostname, pathname, port, protocol, search } = url; | ||
let query; | ||
if (search) { | ||
query = parseQueryString(search); | ||
} | ||
return { | ||
hostname, | ||
port: port ? parseInt(port) : undefined, | ||
protocol, | ||
path: pathname, | ||
query, | ||
}; | ||
}; | ||
export * from "@smithy/url-parser"; |
@@ -1,5 +0,1 @@ | ||
import { UrlParser } from "@aws-sdk/types"; | ||
/** | ||
* @internal | ||
*/ | ||
export declare const parseUrl: UrlParser; | ||
export * from "@smithy/url-parser"; |
@@ -1,2 +0,1 @@ | ||
import { UrlParser } from "@aws-sdk/types"; | ||
export declare const parseUrl: UrlParser; | ||
export * from "@smithy/url-parser"; |
{ | ||
"name": "@aws-sdk/url-parser", | ||
"version": "3.370.0", | ||
"version": "3.374.0", | ||
"scripts": { | ||
@@ -12,3 +12,3 @@ "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", | ||
"clean": "rimraf ./dist-* && rimraf *.tsbuildinfo", | ||
"test": "jest" | ||
"test": "exit 0" | ||
}, | ||
@@ -24,4 +24,3 @@ "main": "./dist-cjs/index.js", | ||
"dependencies": { | ||
"@aws-sdk/querystring-parser": "3.370.0", | ||
"@aws-sdk/types": "3.370.0", | ||
"@smithy/url-parser": "^1.0.1", | ||
"tslib": "^2.5.0" | ||
@@ -28,0 +27,0 @@ }, |
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
2
-33.33%13509
-7.31%7
-85.11%1
Infinity%1
Infinity%+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed