Skip to content

Commit

Permalink
Add utility function: path.basename.
Browse files Browse the repository at this point in the history
  • Loading branch information
dumganhar committed Feb 22, 2024
1 parent 349047b commit b4fc579
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions modules/utils/src/path.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ export function dirname (path: string): string {
return formatPath(ps.dirname(path));
}

export function basename (path: string): string {
return formatPath(ps.basename(path));
}

export function join (...args: string[]): string {
return formatPath(ps.join(...args));
}
Expand Down

0 comments on commit b4fc579

Please sign in to comment.