Files
NapCatQQ/.pnpm-store/v3/files/84/a44d74ac3aaf2ff178cce387bd55445f792d186c960154d2333750e8748f2eba2f361837e62df208b52737843a6a8438f8483f210261355037062a2f5baf67
T
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

9 lines
253 B
Plaintext

/**
* Removes everything after the last "/", but leaves the slash.
*/
export default function stripFilename(path: string | undefined | null): string {
if (!path) return '';
const index = path.lastIndexOf('/');
return path.slice(0, index + 1);
}