mirror of
https://github.com/tvytlx/ai-agent-deep-dive.git
synced 2026-04-05 00:24:50 +08:00
Add extracted source directory and README navigation
This commit is contained in:
23
extracted-source/node_modules/@smithy/url-parser/dist-cjs/index.js
generated
vendored
Normal file
23
extracted-source/node_modules/@smithy/url-parser/dist-cjs/index.js
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
'use strict';
|
||||
|
||||
var querystringParser = require('@smithy/querystring-parser');
|
||||
|
||||
const parseUrl = (url) => {
|
||||
if (typeof url === "string") {
|
||||
return parseUrl(new URL(url));
|
||||
}
|
||||
const { hostname, pathname, port, protocol, search } = url;
|
||||
let query;
|
||||
if (search) {
|
||||
query = querystringParser.parseQueryString(search);
|
||||
}
|
||||
return {
|
||||
hostname,
|
||||
port: port ? parseInt(port) : undefined,
|
||||
protocol,
|
||||
path: pathname,
|
||||
query,
|
||||
};
|
||||
};
|
||||
|
||||
exports.parseUrl = parseUrl;
|
||||
Reference in New Issue
Block a user