finish file-graph and solve jest ts

This commit is contained in:
wancat committed 2024-02-07 10:03:53 +08:00
1 parent 2a542302bc
commit 253bd04588
9 files changed
+40 -28

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
export function dirname(path: string) {
const parts = path.split('/')
if (parts.length <= 2) {
return '/'
}
parts.pop()
return parts.join('/')
}
export function basename(path: string): string {
const parts = path.split('/')
return parts.pop() ?? ''
}