bun-types
Version:
Type definitions and documentation for Bun, an incredibly fast JavaScript runtime
15 lines (10 loc) • 301 B
Markdown
name: Convert a file URL to an absolute path
Use `Bun.fileURLToPath()` to convert a `file://` URL to an absolute path.
```ts
Bun.fileURLToPath("file:///path/to/file.txt");
// => "/path/to/file.txt"
```
See [Docs > API > Utils](https://bun.sh/docs/api/utils) for more useful utilities.