mirror of
https://github.com/bytedream/stream-bypass.git
synced 2025-12-16 08:40:44 +01:00
update
This commit is contained in:
6
src/utils/extract.ts
Normal file
6
src/utils/extract.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
export function lastPathSegment(path: string): string {
|
||||
while (path.endsWith('/')) {
|
||||
path = path.slice(0, -1);
|
||||
}
|
||||
return path.substring(path.lastIndexOf('/') + 1);
|
||||
}
|
||||
Reference in New Issue
Block a user