Files
opencrm/frontend/node_modules/@jridgewell/trace-mapping/src/strip-filename.ts
T
Stefan Hacker 32a7dc74e1 first commit
2026-01-29 01:16:54 +01:00

9 lines
253 B
TypeScript

/**
* 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);
}