mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-06 03:20:13 +08:00
11 lines
194 B
JavaScript
11 lines
194 B
JavaScript
export function dirname(path) {
|
|
const parts = path.split('/')
|
|
parts.pop()
|
|
return parts.join('/')
|
|
}
|
|
|
|
export function basename(path) {
|
|
const parts = path.split('/')
|
|
return parts.pop()
|
|
}
|