(path/parse) suggestion: ParsedPath.toString return string representing full path
- Dominant language
- TypeScript
- Stars
- 3.6k
- Forks
- 681
- PR merge metrics
- No merged PRs in 30d
Description
**Is your feature request related to a problem? Please describe.**
It would be nice if [ParsedPath.toString](https://deno.land/std@0.151.0/path/mod.ts?s=ParsedPath) returned a string of the path that created it, like [URL](https://developer.mozilla.org/en-US/docs/Web/API/URL/toString). Currently it returns `"[object Object]"`.
Example:
```
> const p = parse("/usr/local/bin")
> p.toString()
"/usr/local/bin"
```
**Describe alternatives you've considered**
Adding a property to ParsedPath that represents the full path, like URL.href.
Or just leave it as is. You can achieve the same thing with `parsed.dir + "/" + parsed.base`, `join(parsed.dir, parsed.base)`, or just saving the string you pass into `parse`.
Contributor guide
Assessment
This issue has not been assessed yet.