This repository has been archived on 2026-03-06. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
openclaw-extensions/wecom/node_modules/tslog/esm/urlToObj.js
T

17 lines
454 B
JavaScript

export function urlToObject(url) {
return {
href: url.href,
protocol: url.protocol,
username: url.username,
password: url.password,
host: url.host,
hostname: url.hostname,
port: url.port,
pathname: url.pathname,
search: url.search,
searchParams: [...url.searchParams].map(([key, value]) => ({ key, value })),
hash: url.hash,
origin: url.origin,
};
}