feat: add merge function

Able to deal with:
1.  merge a subtree
This commit is contained in:
wancat authored and Chen, Tai-Lin committed 2023-08-28 14:39:52 +08:00
1 parent 1778780364
commit a66de4dfe1
5 files changed
+114 -5

No files matched your search

+3
View File
@@ -1,5 +1,8 @@
export function dirname(path) {
const parts = path.split('/')
if (parts.length <= 2) {
return '/'
}
parts.pop()
return parts.join('/')
}