mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-06 03:20:13 +08:00
feat: add merge function
Able to deal with: 1. merge a subtree
This commit is contained in:
1 parent
1778780364
commit
a66de4dfe1
5 files changed
+114
-5
No files matched your search
@@ -1,5 +1,8 @@
|
||||
export function dirname(path) {
|
||||
const parts = path.split('/')
|
||||
if (parts.length <= 2) {
|
||||
return '/'
|
||||
}
|
||||
parts.pop()
|
||||
return parts.join('/')
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user