Files
NapCatQQ/.pnpm-store/v3/files/50/f064abc05dfc40e41f8f152081561055e2aed953ff9e88a7f28ecfbe11e60c4637b3dcbfc0a457d45d08540d4c2091759699d8182d50dd8782aaf5650ae4b7
TanTan e311ca3275
Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

18 lines
707 B
Plaintext

export const parsePath = (path) => {
const hashIndex = path.indexOf('#');
const queryIndex = path.indexOf('?');
const hasHash = hashIndex !== -1;
const hash = hasHash ? path.slice(hashIndex) : '';
const hasQuery = queryIndex !== -1 && (!hasHash || queryIndex < hashIndex);
const query = hasQuery
? path.slice(queryIndex, hasHash ? hashIndex : undefined)
: '';
const pathname = hasQuery
? path.slice(0, queryIndex)
: hasHash
? path.slice(0, hashIndex)
: path;
return { pathname, query, hash };
};
export const stringifyPath = ({ pathname, query, hash }) => pathname + query + hash;
//# sourceMappingURL=parse-path.js.map